codafs: fix compile warning when CONFIG_SYSCTL=n
authorRakib Mullick <rakib.mullick@gmail.com>
Tue, 22 Mar 2011 23:35:00 +0000 (16:35 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 23 Mar 2011 00:44:16 +0000 (17:44 -0700)
When CONFIG_SYSCTL=n, we get the following warning:

fs/coda/sysctl.c:18: warning: `coda_tabl' defined but not used

Fix the warning by making sure coda_table and it's callee function are in
the same context.  Also clean up the code by removing extra #ifdef.

[akpm@linux-foundation.org: remove unneeded stub macros]
Signed-off-by: Rakib Mullick <rakib.mullick@gmail.com>
Cc: Jan Harkes <jaharkes@cs.cmu.edu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/coda/sysctl.c

index c6405ce3c50ecb92f3b800b3f750dd96835d41f9..06d27a41807fb5be7f9f6eb65f227140205b4f77 100644 (file)
@@ -13,7 +13,6 @@
 
 #ifdef CONFIG_SYSCTL
 static struct ctl_table_header *fs_table_header;
-#endif
 
 static ctl_table coda_table[] = {
        {
@@ -40,7 +39,6 @@ static ctl_table coda_table[] = {
        {}
 };
 
-#ifdef CONFIG_SYSCTL
 static ctl_table fs_table[] = {
        {
                .procname       = "coda",
@@ -49,22 +47,18 @@ static ctl_table fs_table[] = {
        },
        {}
 };
-#endif
 
 void coda_sysctl_init(void)
 {
-#ifdef CONFIG_SYSCTL
        if ( !fs_table_header )
                fs_table_header = register_sysctl_table(fs_table);
-#endif
 }
 
 void coda_sysctl_clean(void)
 {
-#ifdef CONFIG_SYSCTL
        if ( fs_table_header ) {
                unregister_sysctl_table(fs_table_header);
                fs_table_header = NULL;
        }
-#endif
 }
+#endif