diff options
author | YueHaibing <yuehaibing@huawei.com> | 2019-09-03 20:06:15 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-09-03 15:46:45 +0200 |
commit | b3d72616b428e28200615dcc7fc5fde04f777d07 (patch) | |
tree | b6bb75834df3a7d0e4a88f1f70d30c739303f769 /drivers/usb | |
parent | 8ceb1417f3ca3fdc3f093113dcf416b7fa9690eb (diff) | |
download | linux-b3d72616b428e28200615dcc7fc5fde04f777d07.tar.bz2 |
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')
-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, enum usb_device_speed speed; int ret = 0; u32 wValue; - u32 wIndex; u16 tmode; wValue = le16_to_cpu(ctrl->wValue); - wIndex = le16_to_cpu(ctrl->wIndex); state = priv_dev->gadget.state; speed = priv_dev->gadget.speed; - switch (ctrl->wValue) { + switch (wValue) { case USB_DEVICE_REMOTE_WAKEUP: priv_dev->wake_up_flag = !!set; break; |