All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] usb: gadget: f_fs: fix __le16 of wMaxPacketSize
@ 2026-06-17  8:59 Ben Dooks
  2026-06-17  9:34 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 3+ messages in thread
From: Ben Dooks @ 2026-06-17  8:59 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Al Viro, Christian Brauner, Sam Day,
	Michael Bommarito, Kees Cook, Ingo Rohloff, linux-usb,
	linux-kernel
  Cc: Ben Dooks

The wMaxPacketSize is __le16 type, fix the sparse warnings by changing
the type.

Fixes:

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

Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
---
 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 75912ce6ab55..35d885178b52 100644
--- a/drivers/usb/gadget/function/f_fs.c
+++ b/drivers/usb/gadget/function/f_fs.c
@@ -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
-- 
2.37.2.352.g3c44437643


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-06-17  9:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-17  8:59 [PATCH] usb: gadget: f_fs: fix __le16 of wMaxPacketSize Ben Dooks
2026-06-17  9:34 ` Greg Kroah-Hartman
2026-06-17  9:56   ` Ben Dooks

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.