Whamcloud - gitweb
b=23685 don't define unused variables
authorBrian J. Murrell <brian.murrell@oracle.com>
Wed, 6 Oct 2010 21:13:37 +0000 (17:13 -0400)
committerAndrew Perepechko <andrew.perepechko@oracle.com>
Fri, 8 Oct 2010 12:49:29 +0000 (16:49 +0400)
When CONFIG_SYSCTL is not defined in the kernel config, a couple of
variables are left unused, yet still defined.

i=Dmitry Zogin
i=Andrew Perepechko

lnet/libcfs/linux/linux-proc.c
lustre/obdclass/linux/linux-sysctl.c

index c3f4738..7b14dfd 100644 (file)
@@ -76,7 +76,9 @@
 #include <asm/div64.h>
 #include "tracefile.h"
 
+#ifdef CONFIG_SYSCTL
 static cfs_sysctl_table_header_t *lnet_table_header = NULL;
+#endif
 extern char lnet_upcall[1024];
 /**
  * The path of debug log dump upcall script.
@@ -488,6 +490,7 @@ static cfs_sysctl_table_t lnet_table[] = {
         {0}
 };
 
+#ifdef CONFIG_SYSCTL
 static cfs_sysctl_table_t top_table[] = {
         {
                 .ctl_name = CTL_LNET,
@@ -504,7 +507,6 @@ static cfs_sysctl_table_t top_table[] = {
 
 int insert_proc(void)
 {
-#ifdef CONFIG_SYSCTL
         if (lnet_table_header == NULL)
                 lnet_table_header = cfs_register_sysctl_table(top_table, 0);
 #endif
index b6333ce..9b5a226 100644 (file)
@@ -54,7 +54,9 @@
 #include <obd_support.h>
 #include <lprocfs_status.h>
 
+#ifdef CONFIG_SYSCTL
 cfs_sysctl_table_header_t *obd_table_header = NULL;
+#endif
 
 #ifndef HAVE_SYSCTL_UNNUMBERED
 
@@ -337,6 +339,7 @@ int LL_PROC_PROTO(proc_at_history)
         return ll_proc_dointvec(table, write, filp, buffer, lenp, ppos);
 }
 
+#ifdef CONFIG_SYSCTL
 static cfs_sysctl_table_t obd_table[] = {
         {
                 .ctl_name = OBD_FAIL_LOC,
@@ -499,6 +502,7 @@ static cfs_sysctl_table_t parent_table[] = {
        },
        {0}
 };
+#endif
 
 void obd_sysctl_init (void)
 {