From 20c5e74c7b47cefaf2cd0f84bdb4830b66452384 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Tue, 17 Apr 2012 09:30:22 +0300 Subject: [PATCH] usb: gadget: add a sparse endian notation 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] 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] devel/drivers/usb/gadget/composite.c:798:24: got unsigned short [unsigned] [usertype] language Signed-off-by: Dan Carpenter Signed-off-by: Felipe Balbi --- drivers/usb/gadget/composite.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c index 4cb1801539a6..a3b19fe37f53 100644 --- a/drivers/usb/gadget/composite.c +++ b/drivers/usb/gadget/composite.c @@ -798,7 +798,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) { -- 2.20.1