diff options
author | Rakib Mullick <rakib.mullick@gmail.com> | 2011-03-22 19:35:00 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-22 20:44:16 -0400 |
commit | 0bc825d240abcaf5ed6e9d59b44215b51718ef5b (patch) | |
tree | 823301d79af115aa1e055c636c61de174f413835 /fs/coda | |
parent | 1c00f0161f5e5bf1a441ea834c923f4102456489 (diff) |
codafs: fix compile warning when CONFIG_SYSCTL=n
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>
Diffstat (limited to 'fs/coda')
-rw-r--r-- | fs/coda/sysctl.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/fs/coda/sysctl.c b/fs/coda/sysctl.c index c6405ce3c50e..06d27a41807f 100644 --- a/fs/coda/sysctl.c +++ b/fs/coda/sysctl.c | |||
@@ -13,7 +13,6 @@ | |||
13 | 13 | ||
14 | #ifdef CONFIG_SYSCTL | 14 | #ifdef CONFIG_SYSCTL |
15 | static struct ctl_table_header *fs_table_header; | 15 | static struct ctl_table_header *fs_table_header; |
16 | #endif | ||
17 | 16 | ||
18 | static ctl_table coda_table[] = { | 17 | static ctl_table coda_table[] = { |
19 | { | 18 | { |
@@ -40,7 +39,6 @@ static ctl_table coda_table[] = { | |||
40 | {} | 39 | {} |
41 | }; | 40 | }; |
42 | 41 | ||
43 | #ifdef CONFIG_SYSCTL | ||
44 | static ctl_table fs_table[] = { | 42 | static ctl_table fs_table[] = { |
45 | { | 43 | { |
46 | .procname = "coda", | 44 | .procname = "coda", |
@@ -49,22 +47,18 @@ static ctl_table fs_table[] = { | |||
49 | }, | 47 | }, |
50 | {} | 48 | {} |
51 | }; | 49 | }; |
52 | #endif | ||
53 | 50 | ||
54 | void coda_sysctl_init(void) | 51 | void coda_sysctl_init(void) |
55 | { | 52 | { |
56 | #ifdef CONFIG_SYSCTL | ||
57 | if ( !fs_table_header ) | 53 | if ( !fs_table_header ) |
58 | fs_table_header = register_sysctl_table(fs_table); | 54 | fs_table_header = register_sysctl_table(fs_table); |
59 | #endif | ||
60 | } | 55 | } |
61 | 56 | ||
62 | void coda_sysctl_clean(void) | 57 | void coda_sysctl_clean(void) |
63 | { | 58 | { |
64 | #ifdef CONFIG_SYSCTL | ||
65 | if ( fs_table_header ) { | 59 | if ( fs_table_header ) { |
66 | unregister_sysctl_table(fs_table_header); | 60 | unregister_sysctl_table(fs_table_header); |
67 | fs_table_header = NULL; | 61 | fs_table_header = NULL; |
68 | } | 62 | } |
69 | #endif | ||
70 | } | 63 | } |
64 | #endif | ||