public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fs, coda: Fix compile warning when CONFIG_SYSCTL=n.
@ 2011-03-13 15:48 Rakib Mullick
  2011-03-14 22:34 ` Andrew Morton
  2011-03-24  7:54 ` [origin tree build failure] " Ingo Molnar
  0 siblings, 2 replies; 6+ messages in thread
From: Rakib Mullick @ 2011-03-13 15:48 UTC (permalink / raw)
  To: Jan Harkes; +Cc: Andrew Morton, LKML, coda, codalist

When CONFIG_SYSCTL=n, we get the following warning:

fs/coda/sysctl.c:18: warning: ‘coda_table’ defined but not used

Following patches fixes the above warning by making sure coda_table
and it's callee
function are in the same context. It also cleans up the code by
removing extra #ifdef.


Signed-off-by: Rakib Mullick <rakib.mullick@gmail.com>
---

diff --git a/fs/coda/sysctl.c b/fs/coda/sysctl.c
index c6405ce..d9cc2b3 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,23 @@ 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
 }
+#else
+
+#define	coda_sysctl_init()		do { }  while (0);
+#define	coda_sysctl_clean()		do { }	while (0);
+
+#endif

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-03-24 16:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-13 15:48 [PATCH] fs, coda: Fix compile warning when CONFIG_SYSCTL=n Rakib Mullick
2011-03-14 22:34 ` Andrew Morton
2011-03-15  3:27   ` Rakib Mullick
2011-03-24  7:54 ` [origin tree build failure] " Ingo Molnar
2011-03-24 10:46   ` Rakib Mullick
2011-03-24 16:02     ` Randy Dunlap

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox