Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

sgi-xp: make some symbols static in xpnet.c

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>
Link: https://lore.kernel.org/r/20200410063618.27143-1-yanaijie@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Jason Yan and committed by
Greg Kroah-Hartman
2a23537b 9e306ba3

+4 -4
+4 -4
drivers/misc/sgi-xp/xpnet.c
··· 96 96 atomic_t use_count; 97 97 }; 98 98 99 - struct net_device *xpnet_device; 99 + static struct net_device *xpnet_device; 100 100 101 101 /* 102 102 * When we are notified of other partitions activating, we add them to ··· 131 131 132 132 /* Define the XPNET debug device structures to be used with dev_dbg() et al */ 133 133 134 - struct device_driver xpnet_dbg_name = { 134 + static struct device_driver xpnet_dbg_name = { 135 135 .name = "xpnet" 136 136 }; 137 137 138 - struct device xpnet_dbg_subname = { 138 + static struct device xpnet_dbg_subname = { 139 139 .init_name = "", /* set to "" */ 140 140 .driver = &xpnet_dbg_name 141 141 }; 142 142 143 - struct device *xpnet = &xpnet_dbg_subname; 143 + static struct device *xpnet = &xpnet_dbg_subname; 144 144 145 145 /* 146 146 * Packet was recevied by XPC and forwarded to us.