Skip to contentSkip to conversation

usb: remove not used variable in usb_ether_curr_dev

PATCH In review Heiko Schocher 2 participants 2 messages May 15, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 usb: remove not used variable in usb_ether_curr_dev

grepping for usb_ether_curr_dev in u-boot source code shows

$ grep -r usb_ether_curr_dev .
./cmd/usb.c:static int __maybe_unused usb_ether_curr_dev = -1; /* current ethernet device */
$

only declared but never used, so it can safely
removed from code.

---
azure build started for it, see:

https://dev.azure.com/hs0298/hs/_build/results?buildId=112&view=results

 cmd/usb.c | 3 ---
 1 file changed, 3 deletions(-)
cmd/usb.c +0 -3
index 3a3764a5b8..225d929176 100644
@@ -25,9 +25,6 @@
 #ifdef CONFIG_USB_STORAGE
 static int usb_stor_curr_dev = -1; /* current device */
 #endif
-#if defined(CONFIG_USB_HOST_ETHER) && !defined(CONFIG_DM_ETH)
-static int __maybe_unused usb_ether_curr_dev = -1; /* current ethernet device */
-#endif
 
 /* some display routines (info command) */
 static char *usb_get_class_desc(unsigned char dclass)
Signature · 1 line
2.37.3
Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · Heiko Schocher

grepping for usb_ether_curr_dev in u-boot source code shows

$ grep -r usb_ether_curr_dev .
./cmd/usb.c:static int __maybe_unused usb_ether_curr_dev = -1; /* current ethernet device */
$

only declared but never used, so it can safely
removed from code.