diff options
author | Pratyush Anand <pratyush.anand@st.com> | 2014-07-21 00:46:53 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-07-22 19:30:58 -0400 |
commit | b1bd3f1a398ef27dd09a594c38dde34472b453af (patch) | |
tree | c5e4177c76122c33caa74a774cdf3497edb620ed /drivers/usb/misc/lvstest.c | |
parent | c5946f9d286ad368329c79107fdf4d825d2091bd (diff) |
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: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Pratyush Anand <pratyush.anand@st.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/misc/lvstest.c')
-rw-r--r-- | drivers/usb/misc/lvstest.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/misc/lvstest.c b/drivers/usb/misc/lvstest.c index 02df9a72b990..7d589c156fb1 100644 --- a/drivers/usb/misc/lvstest.c +++ b/drivers/usb/misc/lvstest.c | |||
@@ -311,7 +311,7 @@ static void lvs_rh_work(struct work_struct *work) | |||
311 | if (ret < 4) | 311 | if (ret < 4) |
312 | continue; | 312 | continue; |
313 | 313 | ||
314 | portchange = port_status->wPortChange; | 314 | portchange = le16_to_cpu(port_status->wPortChange); |
315 | 315 | ||
316 | if (portchange & USB_PORT_STAT_C_LINK_STATE) | 316 | if (portchange & USB_PORT_STAT_C_LINK_STATE) |
317 | lvs_rh_clear_port_feature(hdev, i, | 317 | lvs_rh_clear_port_feature(hdev, i, |
@@ -329,7 +329,7 @@ static void lvs_rh_work(struct work_struct *work) | |||
329 | lvs_rh_clear_port_feature(hdev, i, | 329 | lvs_rh_clear_port_feature(hdev, i, |
330 | USB_PORT_FEAT_C_CONNECTION); | 330 | USB_PORT_FEAT_C_CONNECTION); |
331 | 331 | ||
332 | if (port_status->wPortStatus & | 332 | if (le16_to_cpu(port_status->wPortStatus) & |
333 | USB_PORT_STAT_CONNECTION) { | 333 | USB_PORT_STAT_CONNECTION) { |
334 | lvs->present = true; | 334 | lvs->present = true; |
335 | lvs->portnum = i; | 335 | lvs->portnum = i; |