public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] 9p: fix compile error if !CONFIG_SYSCTL
@ 2007-09-18  8:05 Andreas Herrmann
  2007-09-18 18:53 ` roel
  2007-09-20  6:31 ` Andrew Morton
  0 siblings, 2 replies; 24+ messages in thread
From: Andreas Herrmann @ 2007-09-18  8:05 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton; +Cc: Eric Van Hensbergen, linux-kernel

Fix compile error if !CONFIG_SYSCTL:

    ...
  LD      .tmp_vmlinux1
net/built-in.o: In function `init_p9':
net/9p/mod.c:59: undefined reference to `p9_sysctl_register'
net/built-in.o: In function `exit_p9':
net/9p/mod.c:75: undefined reference to `p9_sysctl_unregister'
make: *** [.tmp_vmlinux1] Error 1
    ...

Signed-off-by: Andreas Herrmann <aherrman@arcor.de>
---
 include/net/9p/9p.h |    4 ++++
 net/9p/mod.c        |    4 ++++
 2 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/include/net/9p/9p.h b/include/net/9p/9p.h
index 88884d3..f723a03 100644
--- a/include/net/9p/9p.h
+++ b/include/net/9p/9p.h
@@ -412,6 +412,10 @@ int p9_idpool_check(int id, struct p9_idpool *p);
 
 int p9_error_init(void);
 int p9_errstr2errno(char *, int);
+
+#ifdef CONFIG_SYSCTL
 int __init p9_sysctl_register(void);
 void __exit p9_sysctl_unregister(void);
+#endif
+
 #endif /* NET_9P_H */
diff --git a/net/9p/mod.c b/net/9p/mod.c
index 4f9e1d2..b4d435c 100644
--- a/net/9p/mod.c
+++ b/net/9p/mod.c
@@ -56,11 +56,13 @@ static int __init init_p9(void)
 		return ret;
 	}
 
+#ifdef CONFIG_SYSCTL
 	ret = p9_sysctl_register();
 	if (ret) {
 		printk(KERN_WARNING "9p: registering sysctl failed\n");
 		return ret;
 	}
+#endif
 
 	return ret;
 }
@@ -72,7 +74,9 @@ static int __init init_p9(void)
 
 static void __exit exit_p9(void)
 {
+#ifdef CONFIG_SYSCTL
 	p9_sysctl_unregister();
+#endif
 	p9_mux_global_exit();
 }
 
-- 
1.5.3



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

end of thread, other threads:[~2007-10-08 21:11 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-18  8:05 [PATCH] 9p: fix compile error if !CONFIG_SYSCTL Andreas Herrmann
2007-09-18 18:53 ` roel
2007-09-18 20:15   ` Andreas Herrmann
2007-09-20  6:31 ` Andrew Morton
2007-09-20  7:23   ` Andreas Herrmann
2007-09-27 21:40   ` Nick Piggin
2007-09-28 14:34     ` Linus Torvalds
2007-09-28  0:05       ` Nick Piggin
2007-09-28 17:11         ` Arjan van de Ven
2007-09-28 17:12         ` Elyse M. Grasso
2007-10-01  7:27           ` A bit of kconfig rewrite (Re: [PATCH] 9p: fix compile error if !CONFIG_SYSCTL) Oleg Verych
2007-10-01  8:05             ` Sam Ravnborg
2007-10-01 12:53             ` Elyse M. Grasso
2007-10-05  2:35             ` [kbuild-devel] " Roman Zippel
2007-10-06 15:26               ` Oleg Verych
2007-10-06 16:03                 ` Linus Torvalds
2007-10-06 17:51                   ` Oleg Verych
2007-10-06 18:59                     ` Sam Ravnborg
2007-10-06 20:47                       ` Oleg Verych
2007-10-06 21:10                         ` Sam Ravnborg
2007-10-06 22:07                           ` Oleg Verych
2007-10-07  9:49                             ` Geert Uytterhoeven
2007-10-08 20:22                             ` Sam Ravnborg
2007-10-08 21:25                               ` Oleg Verych

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