Skip to contentSkip to conversation

staging/lustre: Make lstcon_console_{init,fini} static

PATCH In review Peter Senna Tschudin 2 participants 2 messages Mar 7, 2015 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging/lustre: Make lstcon_console_{init,fini} static

sparse was complaining that the symbols 'lstcon_console_init' and 'lstcon_console_fini' were not declared.

Declaring both as static.

---
 drivers/staging/lustre/lnet/selftest/console.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/staging/lustre/lnet/selftest/console.c +2 -4
index 1e0afc2..6d62c48 100644
@@ -1989,8 +1989,7 @@ extern int lstcon_ioctl_entry(unsigned int cmd, struct libcfs_ioctl_data *data);
 static DECLARE_IOCTL_HANDLER(lstcon_ioctl_handler, lstcon_ioctl_entry);
 
 /* initialize console */
-int
-lstcon_console_init(void)
+static int lstcon_console_init(void)
 {
 	int     i;
 	int     rc;
@@ -2059,8 +2058,7 @@ out:
 	return rc;
 }
 
-int
-lstcon_console_fini(void)
+static int lstcon_console_fini(void)
 {
 	int     i;
 
Signature · 1 line
2.1.0
#1 lore raw
Quoted 4 lines · Peter Senna Tschudin

sparse was complaining that the symbols 'lstcon_console_init' and 'lstcon_console_fini' were not declared.

Declaring both as static.

you have not even build tested your patch.

WARNING: "lstcon_console_init" [drivers/staging/lustre/lnet/selftest/lnet_selftest.ko] undefined!
WARNING: "lstcon_console_fini" [drivers/staging/lustre/lnet/selftest/lnet_selftest.ko] undefined!

both of them are being used in selftest/module.c

regards
sudip

Quoted 38 lines
---
 drivers/staging/lustre/lnet/selftest/console.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/staging/lustre/lnet/selftest/console.c +2 -4
index 1e0afc2..6d62c48 100644
@@ -1989,8 +1989,7 @@ extern int lstcon_ioctl_entry(unsigned int cmd, struct libcfs_ioctl_data *data);
 static DECLARE_IOCTL_HANDLER(lstcon_ioctl_handler, lstcon_ioctl_entry);
 
 /* initialize console */
-int
-lstcon_console_init(void)
+static int lstcon_console_init(void)
 {
 	int     i;
 	int     rc;
@@ -2059,8 +2058,7 @@ out:
 	return rc;
 }
 
-int
-lstcon_console_fini(void)
+static int lstcon_console_fini(void)
 {
 	int     i;
 
Signature · 7 lines
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/