Commit b1bd3f1a authored by Pratyush Anand's avatar Pratyush Anand Committed by Greg Kroah-Hartman
Browse files

usb: lvstest: Fix sparse warnings generated by kbuild test bot

Following sparse warnings were reported by kbuild test bot

drivers/usb/misc/lvstest.c:314:28: sparse: incorrect type in assignment (different base types)
   drivers/usb/misc/lvstest.c:314:28:    expected unsigned short [unsigned] [usertype] portchange
   drivers/usb/misc/lvstest.c:314:28:    got restricted __le16 [usertype] wPortChange
drivers/usb/misc/lvstest.c:332:40: sparse: restricted __le16 degrades to integer

This patch fixes above warnings.
Reported-by: default avatarkbuild test robot <>
Signed-off-by: default avatarPratyush Anand <>
Signed-off-by: default avatarGreg Kroah-Hartman <>
parent c5946f9d
......@@ -311,7 +311,7 @@ static void lvs_rh_work(struct work_struct *work)
if (ret < 4)
portchange = port_status->wPortChange;
portchange = le16_to_cpu(port_status->wPortChange);
if (portchange & USB_PORT_STAT_C_LINK_STATE)
lvs_rh_clear_port_feature(hdev, i,
......@@ -329,7 +329,7 @@ static void lvs_rh_work(struct work_struct *work)
lvs_rh_clear_port_feature(hdev, i,
if (port_status->wPortStatus &
if (le16_to_cpu(port_status->wPortStatus) &
lvs->present = true;
lvs->portnum = i;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment