All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] usb/early: remove set but not used variable 'remain_length'
@ 2018-10-06  2:23 ` YueHaibing
  0 siblings, 0 replies; 2+ messages in thread
From: YueHaibing @ 2018-10-06  2:23 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Andrew Morton, Stephen Rothwell,
	Mike Rapoport, Lu Baolu
  Cc: YueHaibing, linux-usb, kernel-janitors

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/usb/early/xhci-dbc.c: In function 'xdbc_handle_tx_event':
drivers/usb/early/xhci-dbc.c:720:9: warning:
 variable 'remain_length' set but not used [-Wunused-but-set-variable]

It never be used since introduction in 
commit aeb9dd1de98c ("usb/early: Add driver for xhci debug capability")

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/usb/early/xhci-dbc.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/usb/early/xhci-dbc.c b/drivers/usb/early/xhci-dbc.c
index 9d4ee88..d2652dc 100644
--- a/drivers/usb/early/xhci-dbc.c
+++ b/drivers/usb/early/xhci-dbc.c
@@ -717,17 +717,14 @@ static void xdbc_handle_port_status(struct xdbc_trb *evt_trb)
 
 static void xdbc_handle_tx_event(struct xdbc_trb *evt_trb)
 {
-	size_t remain_length;
 	u32 comp_code;
 	int ep_id;
 
 	comp_code	= GET_COMP_CODE(le32_to_cpu(evt_trb->field[2]));
-	remain_length	= EVENT_TRB_LEN(le32_to_cpu(evt_trb->field[2]));
 	ep_id		= TRB_TO_EP_ID(le32_to_cpu(evt_trb->field[3]));
 
 	switch (comp_code) {
 	case COMP_SUCCESS:
-		remain_length = 0;
 	case COMP_SHORT_PACKET:
 		break;
 	case COMP_TRB_ERROR:

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [-next] usb/early: remove set but not used variable 'remain_length'
@ 2018-10-06  2:23 ` YueHaibing
  0 siblings, 0 replies; 2+ messages in thread
From: YueHaibing @ 2018-10-06  2:23 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Andrew Morton, Stephen Rothwell,
	Mike Rapoport, Lu Baolu
  Cc: YueHaibing, linux-usb, kernel-janitors

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/usb/early/xhci-dbc.c: In function 'xdbc_handle_tx_event':
drivers/usb/early/xhci-dbc.c:720:9: warning:
 variable 'remain_length' set but not used [-Wunused-but-set-variable]

It never be used since introduction in 
commit aeb9dd1de98c ("usb/early: Add driver for xhci debug capability")

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/usb/early/xhci-dbc.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/usb/early/xhci-dbc.c b/drivers/usb/early/xhci-dbc.c
index 9d4ee88..d2652dc 100644
--- a/drivers/usb/early/xhci-dbc.c
+++ b/drivers/usb/early/xhci-dbc.c
@@ -717,17 +717,14 @@ static void xdbc_handle_port_status(struct xdbc_trb *evt_trb)
 
 static void xdbc_handle_tx_event(struct xdbc_trb *evt_trb)
 {
-	size_t remain_length;
 	u32 comp_code;
 	int ep_id;
 
 	comp_code	= GET_COMP_CODE(le32_to_cpu(evt_trb->field[2]));
-	remain_length	= EVENT_TRB_LEN(le32_to_cpu(evt_trb->field[2]));
 	ep_id		= TRB_TO_EP_ID(le32_to_cpu(evt_trb->field[3]));
 
 	switch (comp_code) {
 	case COMP_SUCCESS:
-		remain_length = 0;
 	case COMP_SHORT_PACKET:
 		break;
 	case COMP_TRB_ERROR:

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-10-06  2:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-06  2:23 [PATCH -next] usb/early: remove set but not used variable 'remain_length' YueHaibing
2018-10-06  2:23 ` [-next] " YueHaibing

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.