Re: [PATCH] usb: gadget: f_fs: fix __le16 of wMaxPacketSize

From: Greg Kroah-Hartman

Date: Fri Jul 10 2026 - 09:04:48 EST


On Wed, Jun 17, 2026 at 10:56:00AM +0100, Ben Dooks wrote:
> On 17/06/2026 10:34, Greg Kroah-Hartman wrote:
> > On Wed, Jun 17, 2026 at 09:59:30AM +0100, Ben Dooks wrote:
> > > 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@xxxxxxxxxxxxxxx>
> > > ---
> > > 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;
> >
> > What commit id does this fix?
>
> bdcc03cef0fd8 ("usb: gadget: f_fs: preserve wMaxPacketSize across
> usb_ep_autoconfig() call")

Great, can you add that as a Fixes: tag when you resend this?

thanks,

greg k-h