linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: build failure after merge of the net-next tree
@ 2015-07-23  1:58 Stephen Rothwell
  2015-07-23  8:08 ` [PATCH net-next] ip_tunnel: Call ip_tunnel_core_init() from inet_init() Thomas Graf
  0 siblings, 1 reply; 4+ messages in thread
From: Stephen Rothwell @ 2015-07-23  1:58 UTC (permalink / raw)
  To: David Miller, netdev; +Cc: linux-next, linux-kernel, Thomas Graf

Hi all,

After merging the net-next tree, today's linux-next build (arm
multi_v7_defconfig) failed like this:

net/ipv4/ip_tunnel_core.c:301:1: warning: data definition has no type or storage class
 module_init(ip_tunnel_core_init);
 ^
net/ipv4/ip_tunnel_core.c:301:1: error: type defaults to 'int' in declaration of 'module_init' [-Werror=implicit-int]
net/ipv4/ip_tunnel_core.c:301:1: warning: parameter names (without types) in function declaration
net/ipv4/ip_tunnel_core.c:307:1: warning: data definition has no type or storage class
 module_exit(ip_tunnel_core_exit);
 ^
net/ipv4/ip_tunnel_core.c:307:1: error: type defaults to 'int' in declaration of 'module_exit' [-Werror=implicit-int]
net/ipv4/ip_tunnel_core.c:307:1: warning: parameter names (without types) in function declaration
net/ipv4/ip_tunnel_core.c:295:19: warning: 'ip_tunnel_core_init' defined but not used [-Wunused-function]
 static int __init ip_tunnel_core_init(void)
                   ^

Caused by commit

  3093fbe7ff4b ("route: Per route IP tunnel metadata via lightweight tunnel")

Forgot to include module.h ...

I have used the net-next tree from next-20150722 for today.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

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

* [PATCH net-next] ip_tunnel: Call ip_tunnel_core_init() from inet_init()
  2015-07-23  1:58 linux-next: build failure after merge of the net-next tree Stephen Rothwell
@ 2015-07-23  8:08 ` Thomas Graf
  2015-07-23  8:28   ` David Miller
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Graf @ 2015-07-23  8:08 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: David Miller, netdev, linux-next, linux-kernel

Convert the module_init() to a invocation from inet_init() since
ip_tunnel_core is part of the INET built-in.

Fixes: 3093fbe7ff4 ("route: Per route IP tunnel metadata via lightweight tunnel")
Signed-off-by: Thomas Graf <tgraf@suug.ch>
---
Compiles for me with:
make ARCH=arm CROSS_COMPILE=arm-linux-gnu-

 include/net/ip_tunnels.h  |  2 ++
 net/ipv4/af_inet.c        |  3 +++
 net/ipv4/ip_tunnel_core.c | 11 +----------
 3 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/include/net/ip_tunnels.h b/include/net/ip_tunnels.h
index d975b3e..4798441 100644
--- a/include/net/ip_tunnels.h
+++ b/include/net/ip_tunnels.h
@@ -311,6 +311,8 @@ static inline int ip_tunnel_collect_metadata(void)
 	return static_key_false(&ip_tunnel_metadata_cnt);
 }
 
+void __init ip_tunnel_core_init(void);
+
 void ip_tunnel_need_metadata(void);
 void ip_tunnel_unneed_metadata(void);
 
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c
index 9532ee8..cc4e498 100644
--- a/net/ipv4/af_inet.c
+++ b/net/ipv4/af_inet.c
@@ -112,6 +112,7 @@
 #include <net/raw.h>
 #include <net/icmp.h>
 #include <net/inet_common.h>
+#include <net/ip_tunnels.h>
 #include <net/xfrm.h>
 #include <net/net_namespace.h>
 #include <net/secure_seq.h>
@@ -1780,6 +1781,8 @@ static int __init inet_init(void)
 
 	dev_add_pack(&ip_packet_type);
 
+	ip_tunnel_core_init();
+
 	rc = 0;
 out:
 	return rc;
diff --git a/net/ipv4/ip_tunnel_core.c b/net/ipv4/ip_tunnel_core.c
index 630e6d5..5512f4e 100644
--- a/net/ipv4/ip_tunnel_core.c
+++ b/net/ipv4/ip_tunnel_core.c
@@ -292,19 +292,10 @@ static const struct lwtunnel_encap_ops ip_tun_lwt_ops = {
 	.get_encap_size = ip_tun_encap_nlsize,
 };
 
-static int __init ip_tunnel_core_init(void)
+void __init ip_tunnel_core_init(void)
 {
 	lwtunnel_encap_add_ops(&ip_tun_lwt_ops, LWTUNNEL_ENCAP_IP);
-
-	return 0;
-}
-module_init(ip_tunnel_core_init);
-
-static void __exit ip_tunnel_core_exit(void)
-{
-	lwtunnel_encap_del_ops(&ip_tun_lwt_ops, LWTUNNEL_ENCAP_IP);
 }
-module_exit(ip_tunnel_core_exit);
 
 struct static_key ip_tunnel_metadata_cnt = STATIC_KEY_INIT_FALSE;
 EXPORT_SYMBOL(ip_tunnel_metadata_cnt);
-- 
2.4.3

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

* Re: [PATCH net-next] ip_tunnel: Call ip_tunnel_core_init() from inet_init()
  2015-07-23  8:28   ` David Miller
@ 2015-07-23  8:17     ` Thomas Graf
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Graf @ 2015-07-23  8:17 UTC (permalink / raw)
  To: David Miller; +Cc: sfr, netdev, linux-next, linux-kernel

On 07/23/15 at 01:28am, David Miller wrote:
> From: Thomas Graf <tgraf@suug.ch>
> Date: Thu, 23 Jul 2015 10:08:44 +0200
> 
> > Convert the module_init() to a invocation from inet_init() since
> > ip_tunnel_core is part of the INET built-in.
> > 
> > Fixes: 3093fbe7ff4 ("route: Per route IP tunnel metadata via lightweight tunnel")
> > Signed-off-by: Thomas Graf <tgraf@suug.ch>
> 
> I applied this instead of my module.h include fix, thanks Thomas.

Thanks, sorry for the extra trouble you had to go through.

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

* Re: [PATCH net-next] ip_tunnel: Call ip_tunnel_core_init() from inet_init()
  2015-07-23  8:08 ` [PATCH net-next] ip_tunnel: Call ip_tunnel_core_init() from inet_init() Thomas Graf
@ 2015-07-23  8:28   ` David Miller
  2015-07-23  8:17     ` Thomas Graf
  0 siblings, 1 reply; 4+ messages in thread
From: David Miller @ 2015-07-23  8:28 UTC (permalink / raw)
  To: tgraf; +Cc: sfr, netdev, linux-next, linux-kernel

From: Thomas Graf <tgraf@suug.ch>
Date: Thu, 23 Jul 2015 10:08:44 +0200

> Convert the module_init() to a invocation from inet_init() since
> ip_tunnel_core is part of the INET built-in.
> 
> Fixes: 3093fbe7ff4 ("route: Per route IP tunnel metadata via lightweight tunnel")
> Signed-off-by: Thomas Graf <tgraf@suug.ch>

I applied this instead of my module.h include fix, thanks Thomas.

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

end of thread, other threads:[~2015-07-23  8:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-23  1:58 linux-next: build failure after merge of the net-next tree Stephen Rothwell
2015-07-23  8:08 ` [PATCH net-next] ip_tunnel: Call ip_tunnel_core_init() from inet_init() Thomas Graf
2015-07-23  8:28   ` David Miller
2015-07-23  8:17     ` Thomas Graf

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).