Skip to contentSkip to conversation

xpnet: fix sparse warnings

PATCH New Lad Prabhakar 1 participant 1 message Feb 5, 2015 Char and misc drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xpnet: fix sparse warnings

From: "Lad, Prabhakar" <[email protected]>

this patch fixes following sparse warnings:

xpnet.c:99:19: warning: symbol 'xpnet_device' was not declared. Should it be static? xpnet.c:132:22: warning: symbol 'xpnet_dbg_name' was not declared. Should it be static? xpnet.c:136:15: warning: symbol 'xpnet_dbg_subname' was not declared. Should it be static? xpnet.c:141:15: warning: symbol 'xpnet' was not declared. Should it be static?

---
Found this issue on linux-next (gcc version 4.8.2, sparse version 0.4.5-rc1)and applies on top linux-next.

 drivers/misc/sgi-xp/xpnet.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/misc/sgi-xp/xpnet.c +4 -4
index 557f978..a55189f 100644
@@ -96,7 +96,7 @@ struct xpnet_pending_msg {
 	atomic_t use_count;
 };
 
-struct net_device *xpnet_device;
+static struct net_device *xpnet_device;
 
 /*
  * When we are notified of other partitions activating, we add them to
@@ -129,16 +129,16 @@ static DEFINE_SPINLOCK(xpnet_broadcast_lock);
 
 /* Define the XPNET debug device structures to be used with dev_dbg() et al */
 
-struct device_driver xpnet_dbg_name = {
+static struct device_driver xpnet_dbg_name = {
 	.name = "xpnet"
 };
 
-struct device xpnet_dbg_subname = {
+static struct device xpnet_dbg_subname = {
 	.init_name = "",	/* set to "" */
 	.driver = &xpnet_dbg_name
 };
 
-struct device *xpnet = &xpnet_dbg_subname;
+static struct device *xpnet = &xpnet_dbg_subname;
 
 /*
  * Packet was recevied by XPC and forwarded to us.
Signature · 1 line
1.9.1