[PATCH 0/3] usb: gadget: udc-xilinx: fix warnings

From: Piyush Mehta
Date: Tue Aug 22 2023 - 02:32:38 EST


Fixed below sparse warnings for the udc-xilinx reported by the kernel
test robot.

Link: https://lore.kernel.org/all/202209020044.CX2PfZzM-lkp@xxxxxxxxx/

Sparse Warnings:
drivers/usb/gadget/udc/udc-xilinx.c:1620:35: sparse: warning: restricted __le16 degrades to integer
drivers/usb/gadget/udc/udc-xilinx.c:1626:31: sparse: warning: restricted __le16 degrades to integer
drivers/usb/gadget/udc/udc-xilinx.c:1641:34: sparse: warning: incorrect type in assignment (different base types)
drivers/usb/gadget/udc/udc-xilinx.c:1641:34: sparse: expected unsigned short [usertype]
drivers/usb/gadget/udc/udc-xilinx.c:1641:34: sparse: got restricted __le16 [usertype]
drivers/usb/gadget/udc/udc-xilinx.c:1669:35: sparse: warning: restricted __le16 degrades to integer
drivers/usb/gadget/udc/udc-xilinx.c:1669:35: sparse: warning: restricted __le16 degrades to integer
drivers/usb/gadget/udc/udc-xilinx.c:1689:46: sparse: warning: restricted __le16 degrades to integer
drivers/usb/gadget/udc/udc-xilinx.c:1695:46: sparse: warning: restricted __le16 degrades to integer
drivers/usb/gadget/udc/udc-xilinx.c:1758:29: sparse: warning: cast from restricted __le16
drivers/usb/gadget/udc/udc-xilinx.c:1759:29: sparse: warning: cast from restricted __le16
drivers/usb/gadget/udc/udc-xilinx.c:1760:30: sparse: warning: cast from restricted __le16
drivers/usb/gadget/udc/udc-xilinx.c:1872:34: sparse: warning: restricted __le16 degrades to integer
drivers/usb/gadget/udc/udc-xilinx.c:1883:49: sparse: warning: incorrect type in argument 3 (different base types)
drivers/usb/gadget/udc/udc-xilinx.c:1883:49: sparse: expected unsigned int [usertype]
drivers/usb/gadget/udc/udc-xilinx.c:1883:49: sparse: got restricted __le16 [usertype] wValue
drivers/usb/gadget/udc/udc-xilinx.c:1888:47: sparse: warning: restricted __le16 degrades to integer

Piyush Mehta (3):
usb: gadget: udc-xilinx: fix restricted __le16 degrades to integer
warning
usb: gadget: udc-xilinx: fix cast from restricted __le16 warning
usb: gadget: udc-xilinx: fix incorrect type in assignment warning

drivers/usb/gadget/udc/udc-xilinx.c | 26 ++++++++++++++------------
1 file changed, 14 insertions(+), 12 deletions(-)

--
2.17.1