Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

usb: host: fhci-tds: Remove unused variables 'buf' and 'extra_data'

Neither have been used since the driver's inception in 2009.

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

drivers/usb/host/fhci-tds.c: In function ‘fhci_flush_bds’:
drivers/usb/host/fhci-tds.c:472:6: warning: variable ‘buf’ set but not used [-Wunused-but-set-variable]
472 | u32 buf;
| ^~~
drivers/usb/host/fhci-tds.c:470:6: warning: variable ‘extra_data’ set but not used [-Wunused-but-set-variable]
470 | u16 extra_data;
| ^~~~~~~~~~
drivers/usb/host/fhci-tds.c: In function ‘fhci_flush_actual_frame’:
drivers/usb/host/fhci-tds.c:527:6: warning: variable ‘extra_data’ set but not used [-Wunused-but-set-variable]
527 | u16 extra_data;
| ^~~~~~~~~~

Cc: Shlomi Gridish <gridish@freescale.com>
Cc: Jerry Huang <Chang-Ming.Huang@freescale.com>
Cc: Peter Barada <peterb@logicpd.com>
Cc: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20200706133341.476881-31-lee.jones@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Lee Jones and committed by
Greg Kroah-Hartman
d45f72bc b789710d

+4 -7
+4 -7
drivers/usb/host/fhci-tds.c
··· 467 467 /* Reset the Tx BD ring */ 468 468 void fhci_flush_bds(struct fhci_usb *usb) 469 469 { 470 - u16 extra_data; 471 470 u16 td_status; 472 - u32 buf; 473 471 struct usb_td __iomem *td; 474 472 struct endpoint *ep = usb->ep0; 475 473 476 474 td = ep->td_base; 477 475 while (1) { 478 476 td_status = in_be16(&td->status); 479 - buf = in_be32(&td->buf_ptr); 480 - extra_data = in_be16(&td->extra); 477 + in_be32(&td->buf_ptr); 478 + in_be16(&td->extra); 481 479 482 480 /* if the TD is not empty - we'll confirm it as Timeout */ 483 481 if (td_status & TD_R) ··· 522 524 { 523 525 u8 mode; 524 526 u16 tb_ptr; 525 - u16 extra_data; 526 527 u16 td_status; 527 528 u32 buf_ptr; 528 529 struct usb_td __iomem *td; ··· 535 538 td = cpm_muram_addr(tb_ptr); 536 539 td_status = in_be16(&td->status); 537 540 buf_ptr = in_be32(&td->buf_ptr); 538 - extra_data = in_be16(&td->extra); 541 + in_be16(&td->extra); 539 542 do { 540 543 if (td_status & TD_R) { 541 544 out_be16(&td->status, (td_status & ~TD_R) | TD_TO); ··· 549 552 td = next_bd(ep->td_base, td, td_status); 550 553 td_status = in_be16(&td->status); 551 554 buf_ptr = in_be32(&td->buf_ptr); 552 - extra_data = in_be16(&td->extra); 555 + in_be16(&td->extra); 553 556 } while ((td_status & TD_R) || buf_ptr); 554 557 555 558 fhci_td_transaction_confirm(usb);