Skip to content

Commit 52ecf81

Browse files
PiyushXilinxgregkh
authored andcommitted
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 <[email protected]> Closes: https://lore.kernel.org/all/[email protected]/ Signed-off-by: Piyush Mehta <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 0411fa8 commit 52ecf81

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/usb/gadget/udc/udc-xilinx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1636,7 +1636,7 @@ static void xudc_getstatus(struct xusb_udc *udc)
16361636
}
16371637

16381638
req->usb_req.length = 2;
1639-
*(u16 *)req->usb_req.buf = cpu_to_le16(status);
1639+
*(__le16 *)req->usb_req.buf = cpu_to_le16(status);
16401640
ret = __xudc_ep0_queue(ep0, req);
16411641
if (ret == 0)
16421642
return;

0 commit comments

Comments
 (0)