Skip to content

Commit

Permalink
usb: gadget: add a sparse endian notation
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Felipe Balbi <balbi@ti.com>
  • Loading branch information
Dan Carpenter authored and Felipe Balbi committed May 4, 2012
1 parent 1ec9c8a commit 20c5e74
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/gadget/composite.c
Original file line number Diff line number Diff line change
Expand Up @@ -798,7 +798,7 @@ int usb_add_config(struct usb_composite_dev *cdev,
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) {
Expand Down

0 comments on commit 20c5e74

Please sign in to comment.