OSDN Git Service

usb: gadget: udc-xilinx: fix incorrect type in assignment warning
authorPiyush Mehta <piyush.mehta@amd.com>
Tue, 22 Aug 2023 06:32:01 +0000 (12:02 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 22 Aug 2023 12:46:45 +0000 (14:46 +0200)
commit52ecf812de2548ea0704e67f99cea1d0f3b8b173
tree0e8d2cccd8b78f05e7fe0d7ba1becd84ee29af00
parent0411fa8a5f655ebc0753e718fdfe68bc66a756f0
usb: gadget: udc-xilinx: fix incorrect type in assignment warning

The bitwise attribute is used by the sparse utility to make sure the
variable is converted to the local processor type before other (unsafe)
operations are performed on the variable. Fix the below sparse warnings
type casted with __le16:

warning: incorrect type in assignment (different base types)
   expected unsigned short [usertype]
   got restricted __le16 [usertype]

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/all/202209020044.CX2PfZzM-lkp@intel.com/
Signed-off-by: Piyush Mehta <piyush.mehta@amd.com>
Link: https://lore.kernel.org/r/20230822063201.16929-4-piyush.mehta@amd.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/udc/udc-xilinx.c