Commit 768a0741 authored by Lee Jones's avatar Lee Jones Committed by Greg Kroah-Hartman

usb: dwc2: gadget: Remove assigned but never used 'maxsize'

The value of 'maxsize' has not been checked since commit 729cac69
("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: default avatarLee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20200702144625.2533530-11-lee.jones@linaro.orgSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8c4a09cb
......@@ -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];
......
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