* [PATCH v3] usb: gadget: f_fs: fix __le16 of wMaxPacketSize
@ 2026-07-13 12:28 Ben Dooks
0 siblings, 0 replies; only message in thread
From: Ben Dooks @ 2026-07-13 12:28 UTC (permalink / raw)
To: Greg Kroah-Hartman, Al Viro, Neill Kapron, Sam Day,
Michael Bommarito, Kees Cook, linux-usb, linux-kernel
Cc: Ben Dooks
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] wMaxPacketSize
drivers/usb/gadget/function/f_fs.c:3346:32: got restricted __le16 [usertype] wMaxPacketSize
drivers/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] wMaxPacketSize
drivers/usb/gadget/function/f_fs.c:3371:36: got unsigned short [usertype] wMaxPacketSize
Fixes: bdcc03cef0fd8 ("usb: gadget: f_fs: preserve wMaxPacketSize across usb_ep_autoconfig() call")
Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
---
v2:
- add fixes tag and reword commit message
v3:
- fix mis-copied git-id for the fixes
---
drivers/usb/gadget/function/f_fs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/gadget/function/f_fs.c b/drivers/usb/gadget/function/f_fs.c
index 44218be1e676..68114278a150 100644
--- a/drivers/usb/gadget/function/f_fs.c
+++ b/drivers/usb/gadget/function/f_fs.c
@@ -3335,7 +3335,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
--
2.37.2.352.g3c44437643
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-07-13 12:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-13 12:28 [PATCH v3] usb: gadget: f_fs: fix __le16 of wMaxPacketSize Ben Dooks
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®