linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] sgi-xp: make some symbols static in xpnet.c
@ 2020-04-10  6:36 Jason Yan
  2020-04-10  6:36 ` [PATCH 2/2] sgi-xp: make some symbols static in xpc_main.c Jason Yan
  0 siblings, 1 reply; 2+ messages in thread
From: Jason Yan @ 2020-04-10  6:36 UTC (permalink / raw)
  To: cpw, robinmholt, arnd, gregkh, linux-kernel; +Cc: Jason Yan

Fix the following sparse warning:

drivers/misc/sgi-xp/xpnet.c:99:19: warning: symbol 'xpnet_device' was
not declared. Should it be static?
drivers/misc/sgi-xp/xpnet.c:134:22: warning: symbol 'xpnet_dbg_name' was
not declared. Should it be static?
drivers/misc/sgi-xp/xpnet.c:138:15: warning: symbol 'xpnet_dbg_subname'
was not declared. Should it be static?
drivers/misc/sgi-xp/xpnet.c:143:15: warning: symbol 'xpnet' was not
declared. Should it be static?

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Jason Yan <yanaijie@huawei.com>
---
 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 ada94e6a3c91..837d6c3fe69c 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
@@ -131,16 +131,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.
-- 
2.17.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH 2/2] sgi-xp: make some symbols static in xpc_main.c
  2020-04-10  6:36 [PATCH 1/2] sgi-xp: make some symbols static in xpnet.c Jason Yan
@ 2020-04-10  6:36 ` Jason Yan
  0 siblings, 0 replies; 2+ messages in thread
From: Jason Yan @ 2020-04-10  6:36 UTC (permalink / raw)
  To: cpw, robinmholt, arnd, gregkh, linux-kernel; +Cc: Jason Yan

Fix the following sparse warning:

drivers/misc/sgi-xp/xpc_main.c:62:22: warning: symbol 'xpc_dbg_name' was
not declared. Should it be static?
drivers/misc/sgi-xp/xpc_main.c:66:15: warning: symbol
'xpc_part_dbg_subname' was not declared. Should it be static?
drivers/misc/sgi-xp/xpc_main.c:71:15: warning: symbol
'xpc_chan_dbg_subname' was not declared. Should it be static?
drivers/misc/sgi-xp/xpc_main.c:1221:1: warning: symbol 'xpc_init' was
not declared. Should it be static?
drivers/misc/sgi-xp/xpc_main.c:1323:1: warning: symbol 'xpc_exit' was
not declared. Should it be static?

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Jason Yan <yanaijie@huawei.com>
---
 drivers/misc/sgi-xp/xpc_main.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/misc/sgi-xp/xpc_main.c b/drivers/misc/sgi-xp/xpc_main.c
index 79a963105983..d5e097cd556d 100644
--- a/drivers/misc/sgi-xp/xpc_main.c
+++ b/drivers/misc/sgi-xp/xpc_main.c
@@ -59,16 +59,16 @@
 
 /* define two XPC debug device structures to be used with dev_dbg() et al */
 
-struct device_driver xpc_dbg_name = {
+static struct device_driver xpc_dbg_name = {
 	.name = "xpc"
 };
 
-struct device xpc_part_dbg_subname = {
+static struct device xpc_part_dbg_subname = {
 	.init_name = "",	/* set to "part" at xpc_init() time */
 	.driver = &xpc_dbg_name
 };
 
-struct device xpc_chan_dbg_subname = {
+static struct device xpc_chan_dbg_subname = {
 	.init_name = "",	/* set to "chan" at xpc_init() time */
 	.driver = &xpc_dbg_name
 };
@@ -1217,7 +1217,7 @@ xpc_system_die(struct notifier_block *nb, unsigned long event, void *_die_args)
 	return NOTIFY_DONE;
 }
 
-int __init
+static int __init
 xpc_init(void)
 {
 	int ret;
@@ -1319,7 +1319,7 @@ xpc_init(void)
 
 module_init(xpc_init);
 
-void __exit
+static void __exit
 xpc_exit(void)
 {
 	xpc_do_exit(xpUnloading);
-- 
2.17.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-04-10  6:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-10  6:36 [PATCH 1/2] sgi-xp: make some symbols static in xpnet.c Jason Yan
2020-04-10  6:36 ` [PATCH 2/2] sgi-xp: make some symbols static in xpc_main.c Jason Yan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).