summaryrefslogtreecommitdiff
path: root/drivers/usb/dwc2
diff options
context:
space:
mode:
authorLee Jones <lee.jones@linaro.org>2020-07-02 15:46:05 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-07-03 10:20:11 +0200
commit768a0741284315d3a454f5f4e2fa88f62b5abfe9 (patch)
treeea45813ae873b83559e5671026086730b9364661 /drivers/usb/dwc2
parent8c4a09cb1bfb84eb4acc88eb5eb5709b76403f9e (diff)
usb: dwc2: gadget: Remove assigned but never used 'maxsize'
The value of 'maxsize' has not been checked since commit 729cac693eecf ("usb: dwc2: Change ISOC DDMA flow") back in 2018, so remove the set but unused variable, which fixes the following W=1 kernel build warning: drivers/usb/dwc2/gadget.c: In function ‘dwc2_gadget_fill_isoc_desc’: drivers/usb/dwc2/gadget.c:885:6: warning: variable ‘maxsize’ set but not used [-Wunused-but-set-variable] 885 | u32 maxsize = 0; | ^~~~~~~ Cc: Minas Harutyunyan <hminas@synopsys.com> Cc: Ben Dooks <ben@simtec.co.uk> Signed-off-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20200702144625.2533530-11-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/dwc2')
-rw-r--r--drivers/usb/dwc2/gadget.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
index 1def9000f936..df5fedaca60a 100644
--- a/drivers/usb/dwc2/gadget.c
+++ b/drivers/usb/dwc2/gadget.c
@@ -882,11 +882,10 @@ static int dwc2_gadget_fill_isoc_desc(struct dwc2_hsotg_ep *hs_ep,
struct dwc2_dma_desc *desc;
struct dwc2_hsotg *hsotg = hs_ep->parent;
u32 index;
- u32 maxsize = 0;
u32 mask = 0;
u8 pid = 0;
- maxsize = dwc2_gadget_get_desc_params(hs_ep, &mask);
+ dwc2_gadget_get_desc_params(hs_ep, &mask);
index = hs_ep->next_desc;
desc = &hs_ep->desc_list[index];