* [PATCH] xpnet: fix sparse warnings
@ 2015-02-05 16:28 Lad Prabhakar
0 siblings, 0 replies; only message in thread
From: Lad Prabhakar @ 2015-02-05 16:28 UTC (permalink / raw)
To: Cliff Whickman, Robin Holt; +Cc: linux-kernel, Lad, Prabhakar
From: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
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?
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
---
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(-)
diff --git a/drivers/misc/sgi-xp/xpnet.c b/drivers/misc/sgi-xp/xpnet.c
index 557f978..a55189f 100644
--- a/drivers/misc/sgi-xp/xpnet.c
+++ b/drivers/misc/sgi-xp/xpnet.c
@@ -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.
--
1.9.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-02-05 16:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-05 16:28 [PATCH] xpnet: fix sparse warnings Lad Prabhakar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®