From 0bc825d240abcaf5ed6e9d59b44215b51718ef5b Mon Sep 17 00:00:00 2001 From: Rakib Mullick Date: Tue, 22 Mar 2011 16:35:00 -0700 Subject: 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 Cc: Jan Harkes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- fs/coda/sysctl.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'fs/coda/sysctl.c') 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 @@ #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 -- cgit v1.2.3 From c03e3126e4f9535f4983d727f036440255c43c82 Mon Sep 17 00:00:00 2001 From: Rakib Mullick Date: Fri, 25 Mar 2011 01:57:01 -0700 Subject: codafs: fix build break when CONFIG_PROC_SYSCTL=n Commit 0bc825d240ab ("codafs: fix compile warning when CONFIG_SYSCTL=n") introduces build breakage, when CONFIG_PROC_SYSCTL=n and CONFIG_CODA_FS=y: fs/built-in.o: In function `init_coda': psdev.c:(.init.text+0xc02): undefined reference to `coda_sysctl_init' psdev.c:(.init.text+0xc7c): undefined reference to `coda_sysctl_clean' fs/built-in.o: In function `exit_coda': psdev.c:(.exit.text+0xa9): undefined reference to `coda_sysctl_clean' make: *** [.tmp_vmlinux1] Error 1 Signed-off-by: Rakib Mullick Reported-by: Ingo Molnar Acked-by: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- fs/coda/sysctl.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'fs/coda/sysctl.c') diff --git a/fs/coda/sysctl.c b/fs/coda/sysctl.c index 06d27a41807f..af56ad56a89a 100644 --- a/fs/coda/sysctl.c +++ b/fs/coda/sysctl.c @@ -61,4 +61,13 @@ void coda_sysctl_clean(void) fs_table_header = NULL; } } + +#else +void coda_sysctl_init(void) +{ +} + +void coda_sysctl_clean(void) +{ +} #endif -- cgit v1.2.3