mbox series

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

Message ID 20230822063201.16929-1-piyush.mehta@amd.com (mailing list archive)
Headers show
Series usb: gadget: udc-xilinx: fix warnings | expand

Message

Mehta, Piyush Aug. 22, 2023, 6:31 a.m. UTC
Fixed below sparse warnings for the udc-xilinx reported by the kernel
test robot.

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

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(-)