[PATCH 31/32] usb: host: fhci-sched: Remove unused variable 'td'

From: Lee Jones
Date: Mon Jul 06 2020 - 09:34:35 EST


'td' has been completely unused since the driver's inception in 2009.

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

drivers/usb/host/fhci-sched.c: In function âfhci_queue_urbâ:
drivers/usb/host/fhci-sched.c:704:13: warning: variable âtdâ set but not used [-Wunused-but-set-variable]
704 | struct td *td;
| ^~

Cc: Shlomi Gridish <gridish@xxxxxxxxxxxxx>
Cc: Jerry Huang <Chang-Ming.Huang@xxxxxxxxxxxxx>
Cc: Peter Barada <peterb@xxxxxxxxxxx>
Cc: Anton Vorontsov <avorontsov@xxxxxxxxxxxxx>
Signed-off-by: Lee Jones <lee.jones@xxxxxxxxxx>
---
drivers/usb/host/fhci-sched.c | 19 +++++++++----------
1 file changed, 9 insertions(+), 10 deletions(-)

diff --git a/drivers/usb/host/fhci-sched.c b/drivers/usb/host/fhci-sched.c
index 3235d53074038..63c646c8f7d62 100644
--- a/drivers/usb/host/fhci-sched.c
+++ b/drivers/usb/host/fhci-sched.c
@@ -701,7 +701,6 @@ void fhci_queue_urb(struct fhci_hcd *fhci, struct urb *urb)
u32 data_len = urb->transfer_buffer_length;
int urb_state = 0;
int toggle = 0;
- struct td *td;
u8 *data;
u16 cnt = 0;

@@ -770,7 +769,7 @@ void fhci_queue_urb(struct fhci_hcd *fhci, struct urb *urb)
usb_endpoint_maxp(&urb->ep->desc)) == 0))
urb_state = US_BULK0;
while (data_len > 4096) {
- td = fhci_td_fill(fhci, urb, urb_priv, ed, cnt,
+ fhci_td_fill(fhci, urb, urb_priv, ed, cnt,
usb_pipeout(urb->pipe) ? FHCI_TA_OUT :
FHCI_TA_IN,
cnt ? USB_TD_TOGGLE_CARRY :
@@ -781,7 +780,7 @@ void fhci_queue_urb(struct fhci_hcd *fhci, struct urb *urb)
cnt++;
}

- td = fhci_td_fill(fhci, urb, urb_priv, ed, cnt,
+ fhci_td_fill(fhci, urb, urb_priv, ed, cnt,
usb_pipeout(urb->pipe) ? FHCI_TA_OUT : FHCI_TA_IN,
cnt ? USB_TD_TOGGLE_CARRY : toggle,
data, data_len, 0, 0, true);
@@ -789,7 +788,7 @@ void fhci_queue_urb(struct fhci_hcd *fhci, struct urb *urb)

if (urb->transfer_flags & URB_ZERO_PACKET &&
cnt < urb_priv->num_of_tds) {
- td = fhci_td_fill(fhci, urb, urb_priv, ed, cnt,
+ fhci_td_fill(fhci, urb, urb_priv, ed, cnt,
usb_pipeout(urb->pipe) ? FHCI_TA_OUT :
FHCI_TA_IN,
USB_TD_TOGGLE_CARRY, NULL, 0, 0, 0, true);
@@ -798,7 +797,7 @@ void fhci_queue_urb(struct fhci_hcd *fhci, struct urb *urb)
break;
case FHCI_TF_INTR:
urb->start_frame = get_frame_num(fhci) + 1;
- td = fhci_td_fill(fhci, urb, urb_priv, ed, cnt++,
+ fhci_td_fill(fhci, urb, urb_priv, ed, cnt++,
usb_pipeout(urb->pipe) ? FHCI_TA_OUT : FHCI_TA_IN,
USB_TD_TOGGLE_DATA0, data, data_len,
urb->interval, urb->start_frame, true);
@@ -808,12 +807,12 @@ void fhci_queue_urb(struct fhci_hcd *fhci, struct urb *urb)
ed->max_pkt_size = usb_endpoint_maxp(&urb->ep->desc);

/* setup stage */
- td = fhci_td_fill(fhci, urb, urb_priv, ed, cnt++, FHCI_TA_SETUP,
+ fhci_td_fill(fhci, urb, urb_priv, ed, cnt++, FHCI_TA_SETUP,
USB_TD_TOGGLE_DATA0, urb->setup_packet, 8, 0, 0, true);

/* data stage */
if (data_len > 0) {
- td = fhci_td_fill(fhci, urb, urb_priv, ed, cnt++,
+ fhci_td_fill(fhci, urb, urb_priv, ed, cnt++,
usb_pipeout(urb->pipe) ? FHCI_TA_OUT :
FHCI_TA_IN,
USB_TD_TOGGLE_DATA1, data, data_len, 0, 0,
@@ -822,12 +821,12 @@ void fhci_queue_urb(struct fhci_hcd *fhci, struct urb *urb)

/* status stage */
if (data_len > 0)
- td = fhci_td_fill(fhci, urb, urb_priv, ed, cnt++,
+ fhci_td_fill(fhci, urb, urb_priv, ed, cnt++,
(usb_pipeout(urb->pipe) ? FHCI_TA_IN :
FHCI_TA_OUT),
USB_TD_TOGGLE_DATA1, data, 0, 0, 0, true);
else
- td = fhci_td_fill(fhci, urb, urb_priv, ed, cnt++,
+ fhci_td_fill(fhci, urb, urb_priv, ed, cnt++,
FHCI_TA_IN,
USB_TD_TOGGLE_DATA1, data, 0, 0, 0, true);

@@ -844,7 +843,7 @@ void fhci_queue_urb(struct fhci_hcd *fhci, struct urb *urb)
*/
frame += cnt * urb->interval;
frame &= 0x07ff;
- td = fhci_td_fill(fhci, urb, urb_priv, ed, cnt,
+ fhci_td_fill(fhci, urb, urb_priv, ed, cnt,
usb_pipeout(urb->pipe) ? FHCI_TA_OUT :
FHCI_TA_IN,
USB_TD_TOGGLE_DATA0,
--
2.25.1