* [patch] usb: gadget: add a sparse endian notation
@ 2012-04-17 6:30 Dan Carpenter
2012-04-18 13:21 ` Felipe Balbi
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2012-04-17 6:30 UTC (permalink / raw)
To: kernel-janitors
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) {
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [patch] usb: gadget: add a sparse endian notation
2012-04-17 6:30 [patch] usb: gadget: add a sparse endian notation Dan Carpenter
@ 2012-04-18 13:21 ` Felipe Balbi
0 siblings, 0 replies; 2+ messages in thread
From: Felipe Balbi @ 2012-04-18 13:21 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 948 bytes --]
On Tue, Apr 17, 2012 at 09:30:22AM +0300, Dan Carpenter wrote:
> 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>
applied, thanks.
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-04-18 13:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-17 6:30 [patch] usb: gadget: add a sparse endian notation Dan Carpenter
2012-04-18 13:21 ` Felipe Balbi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox