netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] net: ipv6: af_inet6: Fix warning when CONFIG_SYSCTL=n
@ 2013-11-16  2:52 Fabio Estevam
  2013-11-16  2:52 ` [PATCH 2/2] net: ipv6: ndisc: " Fabio Estevam
  2013-11-16 18:05 ` [PATCH 1/2] net: ipv6: af_inet6: " Vlad Yasevich
  0 siblings, 2 replies; 6+ messages in thread
From: Fabio Estevam @ 2013-11-16  2:52 UTC (permalink / raw)
  To: davem; +Cc: netdev, Fabio Estevam

From: Fabio Estevam <fabio.estevam@freescale.com>

When CONFIG_SYSCTL=n the following build warning happens:

net/ipv6/af_inet6.c:710:13: warning: 'ipv6_packet_cleanup' defined but not used [-Wunused-function]

ipv6_packet_cleanup() is only used when CONFIG_SYSCTL=y, so protect its 
definition with an'ifdef CONFIG_SYSCTL'.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 net/ipv6/af_inet6.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c
index ff75313..e4ad65c 100644
--- a/net/ipv6/af_inet6.c
+++ b/net/ipv6/af_inet6.c
@@ -707,10 +707,12 @@ static int __init ipv6_packet_init(void)
 	return 0;
 }
 
+#ifdef CONFIG_SYSCTL
 static void ipv6_packet_cleanup(void)
 {
 	dev_remove_pack(&ipv6_packet_type);
 }
+#endif
 
 static int __net_init ipv6_init_mibs(struct net *net)
 {
-- 
1.8.1.2

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

end of thread, other threads:[~2013-11-18 19:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-16  2:52 [PATCH 1/2] net: ipv6: af_inet6: Fix warning when CONFIG_SYSCTL=n Fabio Estevam
2013-11-16  2:52 ` [PATCH 2/2] net: ipv6: ndisc: " Fabio Estevam
2013-11-18 19:49   ` David Miller
2013-11-16 18:05 ` [PATCH 1/2] net: ipv6: af_inet6: " Vlad Yasevich
2013-11-16 18:22   ` Vlad Yasevich
2013-11-16 18:26   ` Hannes Frederic Sowa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).