diff options
author | YueHaibing <yuehaibing@huawei.com> | 2019-09-03 08:06:15 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-09-03 09:46:45 -0400 |
commit | b3d72616b428e28200615dcc7fc5fde04f777d07 (patch) | |
tree | b6bb75834df3a7d0e4a88f1f70d30c739303f769 /drivers/usb/cdns3/ep0.c | |
parent | 8ceb1417f3ca3fdc3f093113dcf416b7fa9690eb (diff) |
usb: cdns3: Fix Wunused-but-set-variable warning
drivers/usb/cdns3/ep0.c: In function cdns3_ep0_feature_handle_device:
drivers/usb/cdns3/ep0.c:290:6: warning: variable wIndex set but not used [-Wunused-but-set-variable]
drivers/usb/cdns3/ep0.c:289:6: warning: variable wValue set but not used [-Wunused-but-set-variable]
wIndex is never used, so remove it.
wValue should be use in the switch statement.
Reported-by: Hulk Robot <hulkci@huawei.com>
Fixes: 7733f6c32e36 ("usb: cdns3: Add Cadence USB3 DRD Driver")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Link: https://lore.kernel.org/r/20190903120615.19504-1-yuehaibing@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/cdns3/ep0.c')
-rw-r--r-- | drivers/usb/cdns3/ep0.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/usb/cdns3/ep0.c b/drivers/usb/cdns3/ep0.c index e94f55d4729c..44f652e8b5a2 100644 --- a/drivers/usb/cdns3/ep0.c +++ b/drivers/usb/cdns3/ep0.c | |||
@@ -287,15 +287,13 @@ static int cdns3_ep0_feature_handle_device(struct cdns3_device *priv_dev, | |||
287 | enum usb_device_speed speed; | 287 | enum usb_device_speed speed; |
288 | int ret = 0; | 288 | int ret = 0; |
289 | u32 wValue; | 289 | u32 wValue; |
290 | u32 wIndex; | ||
291 | u16 tmode; | 290 | u16 tmode; |
292 | 291 | ||
293 | wValue = le16_to_cpu(ctrl->wValue); | 292 | wValue = le16_to_cpu(ctrl->wValue); |
294 | wIndex = le16_to_cpu(ctrl->wIndex); | ||
295 | state = priv_dev->gadget.state; | 293 | state = priv_dev->gadget.state; |
296 | speed = priv_dev->gadget.speed; | 294 | speed = priv_dev->gadget.speed; |
297 | 295 | ||
298 | switch (ctrl->wValue) { | 296 | switch (wValue) { |
299 | case USB_DEVICE_REMOTE_WAKEUP: | 297 | case USB_DEVICE_REMOTE_WAKEUP: |
300 | priv_dev->wake_up_flag = !!set; | 298 | priv_dev->wake_up_flag = !!set; |
301 | break; | 299 | break; |