[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200702144625.2533530-11-lee.jones@linaro.org>
Date: Thu, 2 Jul 2020 15:46:05 +0100
From: Lee Jones <lee.jones@...aro.org>
To: gregkh@...uxfoundation.org
Cc: linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux-usb@...r.kernel.org, Lee Jones <lee.jones@...aro.org>,
Minas Harutyunyan <hminas@...opsys.com>,
Ben Dooks <ben@...tec.co.uk>
Subject: [PATCH 10/30] 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@...opsys.com>
Cc: Ben Dooks <ben@...tec.co.uk>
Signed-off-by: Lee Jones <lee.jones@...aro.org>
---
drivers/usb/dwc2/gadget.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
index 14c422ee6a069..116e6175c7a48 100644
--- a/drivers/usb/dwc2/gadget.c
+++ b/drivers/usb/dwc2/gadget.c
@@ -880,11 +880,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];
--
2.25.1
Powered by blists - more mailing lists