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

usb: musb: remove unused variable 'count'

The variable count is being initialized and incremented but it is never
actually referenced in any other way. The variable is redundant and can
be removed.

Cleans up clang scan build warning:
drivers/usb/musb/musb_gadget.c:1747:12: warning: variable 'count' set
but not used [-Wunused-but-set-variable]

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Link: https://lore.kernel.org/r/20240229115548.218713-1-colin.i.king@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Colin Ian King and committed by
Greg Kroah-Hartman
2e021179 0a5d0a0e

-4
-4
drivers/usb/musb/musb_gadget.c
··· 1744 1744 { 1745 1745 u8 epnum; 1746 1746 struct musb_hw_ep *hw_ep; 1747 - unsigned count = 0; 1748 1747 1749 1748 /* initialize endpoint list just once */ 1750 1749 INIT_LIST_HEAD(&(musb->g.ep_list)); ··· 1753 1754 epnum++, hw_ep++) { 1754 1755 if (hw_ep->is_shared_fifo /* || !epnum */) { 1755 1756 init_peripheral_ep(musb, &hw_ep->ep_in, epnum, 0); 1756 - count++; 1757 1757 } else { 1758 1758 if (hw_ep->max_packet_sz_tx) { 1759 1759 init_peripheral_ep(musb, &hw_ep->ep_in, 1760 1760 epnum, 1); 1761 - count++; 1762 1761 } 1763 1762 if (hw_ep->max_packet_sz_rx) { 1764 1763 init_peripheral_ep(musb, &hw_ep->ep_out, 1765 1764 epnum, 0); 1766 - count++; 1767 1765 } 1768 1766 } 1769 1767 }