usb: gadget: f_fs: fix __le16 of wMaxPacketSize
PATCH v2 1/1 usb: gadget: f_fs: fix __le16 of wMaxPacketSize
The wMaxPacketSize is __le16 type, fix the sparse warnings by changing the type.
Fixes the following sparse warnings:drivers/usb/gadget/function/f_fs.c:3346:32: warning: incorrect type in assignment (different base types)drivers/usb/gadget/function/f_fs.c:3346:32: expected unsigned short [usertype] wMaxPacketSizedrivers/usb/gadget/function/f_fs.c:3346:32: got restricted __le16 [usertype] wMaxPacketSizedrivers/usb/gadget/function/f_fs.c:3371:36: warning: incorrect type in assignment (different base types)drivers/usb/gadget/function/f_fs.c:3371:36: expected restricted __le16 [usertype] wMaxPacketSizedrivers/usb/gadget/function/f_fs.c:3371:36: got unsigned short [usertype] wMaxPacketSize
---
v2:
- add fixes tag and reword commit message
--- drivers/usb/gadget/function/f_fs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/gadget/function/f_fs.c +1 -1
@@ -3332,7 +3332,7 @@ static int __ffs_func_bind_do_descs(enum ffs_entity_type type, u8 *valuep,struct usb_request *req;struct usb_ep *ep;u8 bEndpointAddress; -u16 wMaxPacketSize; +__le16 wMaxPacketSize;/* * We back up bEndpointAddress because autoconfig overwrites
Signature · 1 line
2.37.2.352.g3c44437643
Greg Kroah-Hartman
maintainerQuoted 11 lines · Ben Dooks
The wMaxPacketSize is
__le16type, fix the sparse warnings by changing the type.Fixes the following sparse warnings:
drivers/usb/gadget/function/f_fs.c:3346:32: warning: incorrect type in assignment (different base types)drivers/usb/gadget/function/f_fs.c:3346:32: expected unsigned short [usertype] wMaxPacketSizedrivers/usb/gadget/function/f_fs.c:3346:32: got restricted__le16[usertype] wMaxPacketSizedrivers/usb/gadget/function/f_fs.c:3371:36: warning: incorrect type in assignment (different base types)drivers/usb/gadget/function/f_fs.c:3371:36: expected restricted__le16[usertype] wMaxPacketSizedrivers/usb/gadget/function/f_fs.c:3371:36: got unsigned short [usertype] wMaxPacketSize
Quoted 1 line
Fixes dcc03cef0fd8 ("usb: gadget: f_fs: preserve wMaxPacketSize across usb_ep_autoconfig() call")
This isn't a valid git id :(
Quoted 12 lines · Greg Kroah-Hartman
Quoted 11 lines · Ben Dooks
The wMaxPacketSize is
__le16type, fix the sparse warnings by changing the type.Fixes the following sparse warnings:
drivers/usb/gadget/function/f_fs.c:3346:32: warning: incorrect type in assignment (different base types)drivers/usb/gadget/function/f_fs.c:3346:32: expected unsigned short [usertype] wMaxPacketSizedrivers/usb/gadget/function/f_fs.c:3346:32: got restricted__le16[usertype] wMaxPacketSizedrivers/usb/gadget/function/f_fs.c:3371:36: warning: incorrect type in assignment (different base types)drivers/usb/gadget/function/f_fs.c:3371:36: expected restricted__le16[usertype] wMaxPacketSizedrivers/usb/gadget/function/f_fs.c:3371:36: got unsigned short [usertype] wMaxPacketSize
Quoted 3 lines
Quoted 1 line
Fixes dcc03cef0fd8 ("usb: gadget: f_fs: preserve wMaxPacketSize across usb_ep_autoconfig() call")This isn't a valid git id :(
Looks like the b got dropped off the front during copy.
usb_ep_autoconfig() call")
commit bdcc03cef0fd8abc6eaeec6ac47e54ae8f8c625f
Author: Andrzej Pietrasiewicz <[email protected]> Date: Thu Jan 31 15:53:40 2019 +0100
usb: gadget: f_fs: preserve wMaxPacketSize acrossusb_ep_autoconfig() call
usb_ep_autoconfig() treats the passed descriptor as if it were an fs descriptor. In particular, for bulk endpoints, it clips wMaxPacketSize to 64. This patch preserves the original value.
Signature · 4 lines
Ben Dooks http://www.codethink.co.uk/ Senior Engineer Codethink - Providing Genius https://www.codethink.co.uk/privacy.html
Greg Kroah-Hartman
maintainerQuoted 29 lines · Ben Dooks
Quoted 12 lines · Greg Kroah-Hartman
Quoted 11 lines · Ben Dooks
The wMaxPacketSize is
__le16type, fix the sparse warnings by changing the type.Fixes the following sparse warnings:
drivers/usb/gadget/function/f_fs.c:3346:32: warning: incorrect type in assignment (different base types)drivers/usb/gadget/function/f_fs.c:3346:32: expected unsigned short [usertype] wMaxPacketSizedrivers/usb/gadget/function/f_fs.c:3346:32: got restricted__le16[usertype] wMaxPacketSizedrivers/usb/gadget/function/f_fs.c:3371:36: warning: incorrect type in assignment (different base types)drivers/usb/gadget/function/f_fs.c:3371:36: expected restricted__le16[usertype] wMaxPacketSizedrivers/usb/gadget/function/f_fs.c:3371:36: got unsigned short [usertype] wMaxPacketSizeQuoted 3 lines
Quoted 1 line
Fixes dcc03cef0fd8 ("usb: gadget: f_fs: preserve wMaxPacketSize across usb_ep_autoconfig() call")This isn't a valid git id :(
Looks like the b got dropped off the front during copy.
Fixes bdcc03cef0fd8 ("usb: gadget: f_fs: preserve wMaxPacketSize across
usb_ep_autoconfig()call")commit
bdcc03cef0fd8abc6eaeec6ac47e54ae8f8c625fAuthor: Andrzej Pietrasiewicz <[email protected]> Date: Thu Jan 31 15:53:40 2019 +0100usb: gadget:
f_fs: preserve wMaxPacketSize acrossusb_ep_autoconfig()
call
Quoted 8 lines
usb_ep_autoconfig()treats the passed descriptor as if it were an fs descriptor. In particular, for bulk endpoints, it clips wMaxPacketSize to 64. This patch preserves the original value.Signed-off-by Andrzej Pietrasiewicz <[email protected]>Signed-off-by Felipe Balbi <[email protected]>
Great, please fix this up and resend.
thanks,
greg k-h