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 xpc_main.c

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

authored by

Jason Yan and committed by
Greg Kroah-Hartman
19df2f8e 2a23537b

+5 -5
+5 -5
drivers/misc/sgi-xp/xpc_main.c
··· 59 59 60 60 /* define two XPC debug device structures to be used with dev_dbg() et al */ 61 61 62 - struct device_driver xpc_dbg_name = { 62 + static struct device_driver xpc_dbg_name = { 63 63 .name = "xpc" 64 64 }; 65 65 66 - struct device xpc_part_dbg_subname = { 66 + static struct device xpc_part_dbg_subname = { 67 67 .init_name = "", /* set to "part" at xpc_init() time */ 68 68 .driver = &xpc_dbg_name 69 69 }; 70 70 71 - struct device xpc_chan_dbg_subname = { 71 + static struct device xpc_chan_dbg_subname = { 72 72 .init_name = "", /* set to "chan" at xpc_init() time */ 73 73 .driver = &xpc_dbg_name 74 74 }; ··· 1217 1217 return NOTIFY_DONE; 1218 1218 } 1219 1219 1220 - int __init 1220 + static int __init 1221 1221 xpc_init(void) 1222 1222 { 1223 1223 int ret; ··· 1319 1319 1320 1320 module_init(xpc_init); 1321 1321 1322 - void __exit 1322 + static void __exit 1323 1323 xpc_exit(void) 1324 1324 { 1325 1325 xpc_do_exit(xpUnloading);