Skip to contentSkip to conversation

net: usbnet: Remove unused driver_name variable

PATCH Applied Florian Fainelli 2 participants 2 messages Apr 5, 2017 – Apr 6, 2017

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: usbnet: Remove unused driver_name variable

With GCC 6.3, we can get the following warning:

drivers/net/usb/usbnet.c:85:19: warning: 'driver_name' defined but not used [-Wunused-const-variable=]

 static const char driver_name [] = "usbnet";
                   ^~~~~~~~~~~
---
 drivers/net/usb/usbnet.c | 2 --
 1 file changed, 2 deletions(-)
drivers/net/usb/usbnet.c +0 -2
index 9890656af735..1cc945cbeaa3 100644
@@ -82,8 +82,6 @@
 // randomly generated ethernet address
 static u8	node_id [ETH_ALEN];
 
-static const char driver_name [] = "usbnet";
-
 /* use ethtool to change the level for any given device */
 static int msg_level = -1;
 module_param (msg_level, int, 0);
Signature · 1 line
2.9.3
maintainer Applied
#1 lore raw

From: Florian Fainelli <[email protected]>
Date: Tue, 4 Apr 2017 18:16:57 -0700

Quoted 8 lines

With GCC 6.3, we can get the following warning:

drivers/net/usb/usbnet.c:85:19: warning: 'driver_name' defined but not used [-Wunused-const-variable=]

 static const char driver_name [] = "usbnet";
                   ^~~~~~~~~~~

Applied, thanks.