Commit 1a4f38a6 authored by Lee Jones's avatar Lee Jones Committed by Greg Kroah-Hartman

usb: gadget: udc: max3420_udc: Remove set, but never checked variable 'addr'

Fixes the following W=1 kernel build warning(s):

 drivers/usb/gadget/udc/max3420_udc.c: In function ‘max3420_handle_setup’:
 drivers/usb/gadget/udc/max3420_udc.c:626:5: warning: variable ‘addr’ set but not used [-Wunused-but-set-variable]
 626 | u8 addr;
 | ^~~~

Cc: Felipe Balbi <balbi@kernel.org>
Cc: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
Acked-by: default avatarJassi Brar <jaswinder.singh@linaro.org>
Link: https://lore.kernel.org/r/20200706133341.476881-24-lee.jones@linaro.orgSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8834f60d
......@@ -623,7 +623,6 @@ static void max3420_set_clear_feature(struct max3420_udc *udc)
static void max3420_handle_setup(struct max3420_udc *udc)
{
struct usb_ctrlrequest setup;
u8 addr;
spi_rd_buf(udc, MAX3420_REG_SUDFIFO, (void *)&setup, 8);
......@@ -647,7 +646,7 @@ static void max3420_handle_setup(struct max3420_udc *udc)
USB_TYPE_STANDARD | USB_RECIP_DEVICE)) {
break;
}
addr = spi_rd8_ack(udc, MAX3420_REG_FNADDR, 1);
spi_rd8_ack(udc, MAX3420_REG_FNADDR, 1);
dev_dbg(udc->dev, "Assigned Address=%d\n", udc->setup.wValue);
return;
case USB_REQ_CLEAR_FEATURE:
......
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