Re: [PATCH] 9p: fix compile error if !CONFIG_SYSCTL

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Andreas Herrmann <aherrman@...>
Cc: Linus Torvalds <torvalds@...>, Andrew Morton <akpm@...>, Eric Van Hensbergen <ericvh@...>, <linux-kernel@...>
Date: Tuesday, September 18, 2007 - 2:53 pm

Andreas Herrmann wrote:
isn't it nicer to do something like this instead?
diff --git a/net/9p/sysctl.c b/net/9p/sysctl.c
index 8b61027..e199865 100644
--- a/net/9p/sysctl.c
+++ b/net/9p/sysctl.c
@@ -68,14 +68,17 @@ static struct ctl_table_header *p9_table_header;
 
 int __init p9_sysctl_register(void)
 {
+#ifdef CONFIG_SYSCTL
 	p9_table_header = register_sysctl_table(p9_ctl_table);
 	if (!p9_table_header)
 		return -ENOMEM;
-
+#endif
 	return 0;
 }
 
 void __exit p9_sysctl_unregister(void)
 {
+#ifdef CONFIG_SYSCTL
 	 unregister_sysctl_table(p9_table_header);
+#endif
 }
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] 9p: fix compile error if !CONFIG_SYSCTL, Andreas Herrmann, (Tue Sep 18, 4:05 am)
Re: [PATCH] 9p: fix compile error if !CONFIG_SYSCTL, Andrew Morton, (Thu Sep 20, 2:31 am)
Re: [PATCH] 9p: fix compile error if !CONFIG_SYSCTL, Nick Piggin, (Thu Sep 27, 5:40 pm)
Re: [PATCH] 9p: fix compile error if !CONFIG_SYSCTL, Linus Torvalds, (Fri Sep 28, 10:34 am)
Re: [PATCH] 9p: fix compile error if !CONFIG_SYSCTL, Nick Piggin, (Thu Sep 27, 8:05 pm)
Re: [PATCH] 9p: fix compile error if !CONFIG_SYSCTL, Elyse M. Grasso, (Fri Sep 28, 1:12 pm)
Re: A bit of kconfig rewrite (Re: [PATCH] 9p: fix compile er..., Geert Uytterhoeven, (Sun Oct 7, 5:49 am)
Re: [PATCH] 9p: fix compile error if !CONFIG_SYSCTL, Arjan van de Ven, (Fri Sep 28, 1:11 pm)
Re: [PATCH] 9p: fix compile error if !CONFIG_SYSCTL, Andreas Herrmann, (Thu Sep 20, 3:23 am)
Re: [PATCH] 9p: fix compile error if !CONFIG_SYSCTL, roel, (Tue Sep 18, 2:53 pm)
Re: [PATCH] 9p: fix compile error if !CONFIG_SYSCTL, Andreas Herrmann, (Tue Sep 18, 4:15 pm)