From: Dan Carpenter <dan.carpenter@oracle.com>
To: kernel-janitors@vger.kernel.org
Subject: [patch] usb: gadget: add a sparse endian notation
Date: Tue, 17 Apr 2012 06:30:22 +0000 [thread overview]
Message-ID: <20120417063022.GC26756@elgon.mountain> (raw)
The original code works fine, but Sparse complains because it isn't
annotated properly.
drivers/usb/gadget/composite.c:793:26: warning: incorrect type in assignment (different base types)
drivers/usb/gadget/composite.c:793:26: expected unsigned short [unsigned] [usertype] language
devel/drivers/usb/gadget/composite.c:793:26: got restricted __le16 [usertype] <noident>
devel/drivers/usb/gadget/composite.c:795:29: warning: restricted __le16 degrades to integer
drivers/usb/gadget/composite.c:798:24: warning: incorrect type in assignment (different base types)
drivers/usb/gadget/composite.c:798:24: expected restricted __le16 [usertype] <noident>
devel/drivers/usb/gadget/composite.c:798:24: got unsigned short [unsigned] [usertype] language
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c
index baaebf2..4672651 100644
--- a/drivers/usb/gadget/composite.c
+++ b/drivers/usb/gadget/composite.c
@@ -785,7 +785,7 @@ done:
static void collect_langs(struct usb_gadget_strings **sp, __le16 *buf)
{
const struct usb_gadget_strings *s;
- u16 language;
+ __le16 language;
__le16 *tmp;
while (*sp) {
next reply other threads:[~2012-04-17 6:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-17 6:30 Dan Carpenter [this message]
2012-04-18 13:21 ` [patch] usb: gadget: add a sparse endian notation Felipe Balbi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120417063022.GC26756@elgon.mountain \
--to=dan.carpenter@oracle.com \
--cc=kernel-janitors@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox