* [PATCH net-next] net: bridge: fix build when IPv6 is disabled
@ 2021-05-14 1:53 Matteo Croce
2021-05-14 7:26 ` Nikolay Aleksandrov
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Matteo Croce @ 2021-05-14 1:53 UTC (permalink / raw)
To: netdev, bridge, Linus Lüssing
Cc: Roopa Prabhu, Nikolay Aleksandrov, David S. Miller,
Jakub Kicinski, linux-kernel
From: Matteo Croce <mcroce@microsoft.com>
The br_ip6_multicast_add_router() prototype is defined only when
CONFIG_IPV6 is enabled, but the function is always referenced, so there
is this build error with CONFIG_IPV6 not defined:
net/bridge/br_multicast.c: In function ‘__br_multicast_enable_port’:
net/bridge/br_multicast.c:1743:3: error: implicit declaration of function ‘br_ip6_multicast_add_router’; did you mean ‘br_ip4_multicast_add_router’? [-Werror=implicit-function-declaration]
1743 | br_ip6_multicast_add_router(br, port);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
| br_ip4_multicast_add_router
net/bridge/br_multicast.c: At top level:
net/bridge/br_multicast.c:2804:13: warning: conflicting types for ‘br_ip6_multicast_add_router’
2804 | static void br_ip6_multicast_add_router(struct net_bridge *br,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
net/bridge/br_multicast.c:2804:13: error: static declaration of ‘br_ip6_multicast_add_router’ follows non-static declaration
net/bridge/br_multicast.c:1743:3: note: previous implicit declaration of ‘br_ip6_multicast_add_router’ was here
1743 | br_ip6_multicast_add_router(br, port);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
Fix this build error by moving the definition out of the #ifdef.
Fixes: a3c02e769efe ("net: bridge: mcast: split multicast router state for IPv4 and IPv6")
Signed-off-by: Matteo Croce <mcroce@microsoft.com>
---
net/bridge/br_multicast.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c
index 0703725527b3..53c3a9d80d9c 100644
--- a/net/bridge/br_multicast.c
+++ b/net/bridge/br_multicast.c
@@ -62,9 +62,9 @@ static void br_multicast_port_group_rexmit(struct timer_list *t);
static void
br_multicast_rport_del_notify(struct net_bridge_port *p, bool deleted);
-#if IS_ENABLED(CONFIG_IPV6)
static void br_ip6_multicast_add_router(struct net_bridge *br,
struct net_bridge_port *port);
+#if IS_ENABLED(CONFIG_IPV6)
static void br_ip6_multicast_leave_group(struct net_bridge *br,
struct net_bridge_port *port,
const struct in6_addr *group,
--
2.31.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] net: bridge: fix build when IPv6 is disabled
2021-05-14 1:53 [PATCH net-next] net: bridge: fix build when IPv6 is disabled Matteo Croce
@ 2021-05-14 7:26 ` Nikolay Aleksandrov
2021-05-14 9:24 ` Linus Lüssing
2021-05-14 17:40 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Nikolay Aleksandrov @ 2021-05-14 7:26 UTC (permalink / raw)
To: Matteo Croce, netdev, bridge, Linus Lüssing
Cc: Roopa Prabhu, David S. Miller, Jakub Kicinski, linux-kernel
On 14/05/2021 04:53, Matteo Croce wrote:
> From: Matteo Croce <mcroce@microsoft.com>
>
> The br_ip6_multicast_add_router() prototype is defined only when
> CONFIG_IPV6 is enabled, but the function is always referenced, so there
> is this build error with CONFIG_IPV6 not defined:
>
> net/bridge/br_multicast.c: In function ‘__br_multicast_enable_port’:
> net/bridge/br_multicast.c:1743:3: error: implicit declaration of function ‘br_ip6_multicast_add_router’; did you mean ‘br_ip4_multicast_add_router’? [-Werror=implicit-function-declaration]
> 1743 | br_ip6_multicast_add_router(br, port);
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> | br_ip4_multicast_add_router
> net/bridge/br_multicast.c: At top level:
> net/bridge/br_multicast.c:2804:13: warning: conflicting types for ‘br_ip6_multicast_add_router’
> 2804 | static void br_ip6_multicast_add_router(struct net_bridge *br,
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> net/bridge/br_multicast.c:2804:13: error: static declaration of ‘br_ip6_multicast_add_router’ follows non-static declaration
> net/bridge/br_multicast.c:1743:3: note: previous implicit declaration of ‘br_ip6_multicast_add_router’ was here
> 1743 | br_ip6_multicast_add_router(br, port);
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Fix this build error by moving the definition out of the #ifdef.
>
> Fixes: a3c02e769efe ("net: bridge: mcast: split multicast router state for IPv4 and IPv6")
> Signed-off-by: Matteo Croce <mcroce@microsoft.com>
> ---
> net/bridge/br_multicast.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c
> index 0703725527b3..53c3a9d80d9c 100644
> --- a/net/bridge/br_multicast.c
> +++ b/net/bridge/br_multicast.c
> @@ -62,9 +62,9 @@ static void br_multicast_port_group_rexmit(struct timer_list *t);
>
> static void
> br_multicast_rport_del_notify(struct net_bridge_port *p, bool deleted);
> -#if IS_ENABLED(CONFIG_IPV6)
> static void br_ip6_multicast_add_router(struct net_bridge *br,
> struct net_bridge_port *port);
> +#if IS_ENABLED(CONFIG_IPV6)
> static void br_ip6_multicast_leave_group(struct net_bridge *br,
> struct net_bridge_port *port,
> const struct in6_addr *group,
>
There's one more issue from that patch-set, I'll send a fix in a minute.
Acked-by: Nikolay Aleksandrov <nikolay@nvidia.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] net: bridge: fix build when IPv6 is disabled
2021-05-14 1:53 [PATCH net-next] net: bridge: fix build when IPv6 is disabled Matteo Croce
2021-05-14 7:26 ` Nikolay Aleksandrov
@ 2021-05-14 9:24 ` Linus Lüssing
2021-05-14 17:40 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Linus Lüssing @ 2021-05-14 9:24 UTC (permalink / raw)
To: Matteo Croce
Cc: netdev, bridge, Roopa Prabhu, Nikolay Aleksandrov,
David S. Miller, Jakub Kicinski, linux-kernel
On Fri, May 14, 2021 at 03:53:48AM +0200, Matteo Croce wrote:
> From: Matteo Croce <mcroce@microsoft.com>
>
> The br_ip6_multicast_add_router() prototype is defined only when
> CONFIG_IPV6 is enabled, but the function is always referenced, so there
> is this build error with CONFIG_IPV6 not defined:
>
> net/bridge/br_multicast.c: In function ‘__br_multicast_enable_port’:
> net/bridge/br_multicast.c:1743:3: error: implicit declaration of function ‘br_ip6_multicast_add_router’; did you mean ‘br_ip4_multicast_add_router’? [-Werror=implicit-function-declaration]
> 1743 | br_ip6_multicast_add_router(br, port);
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> | br_ip4_multicast_add_router
> net/bridge/br_multicast.c: At top level:
> net/bridge/br_multicast.c:2804:13: warning: conflicting types for ‘br_ip6_multicast_add_router’
> 2804 | static void br_ip6_multicast_add_router(struct net_bridge *br,
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> net/bridge/br_multicast.c:2804:13: error: static declaration of ‘br_ip6_multicast_add_router’ follows non-static declaration
> net/bridge/br_multicast.c:1743:3: note: previous implicit declaration of ‘br_ip6_multicast_add_router’ was here
> 1743 | br_ip6_multicast_add_router(br, port);
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Fix this build error by moving the definition out of the #ifdef.
>
> Fixes: a3c02e769efe ("net: bridge: mcast: split multicast router state for IPv4 and IPv6")
> Signed-off-by: Matteo Croce <mcroce@microsoft.com>
> ---
> net/bridge/br_multicast.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c
> index 0703725527b3..53c3a9d80d9c 100644
> --- a/net/bridge/br_multicast.c
> +++ b/net/bridge/br_multicast.c
> @@ -62,9 +62,9 @@ static void br_multicast_port_group_rexmit(struct timer_list *t);
>
> static void
> br_multicast_rport_del_notify(struct net_bridge_port *p, bool deleted);
> -#if IS_ENABLED(CONFIG_IPV6)
> static void br_ip6_multicast_add_router(struct net_bridge *br,
> struct net_bridge_port *port);
> +#if IS_ENABLED(CONFIG_IPV6)
> static void br_ip6_multicast_leave_group(struct net_bridge *br,
> struct net_bridge_port *port,
> const struct in6_addr *group,
> --
> 2.31.1
>
Acked-by: Linus Lüssing <linus.luessing@c0d3.blue>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] net: bridge: fix build when IPv6 is disabled
2021-05-14 1:53 [PATCH net-next] net: bridge: fix build when IPv6 is disabled Matteo Croce
2021-05-14 7:26 ` Nikolay Aleksandrov
2021-05-14 9:24 ` Linus Lüssing
@ 2021-05-14 17:40 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-05-14 17:40 UTC (permalink / raw)
To: Matteo Croce
Cc: netdev, bridge, linus.luessing, roopa, nikolay, davem, kuba,
linux-kernel
Hello:
This patch was applied to netdev/net-next.git (refs/heads/master):
On Fri, 14 May 2021 03:53:48 +0200 you wrote:
> From: Matteo Croce <mcroce@microsoft.com>
>
> The br_ip6_multicast_add_router() prototype is defined only when
> CONFIG_IPV6 is enabled, but the function is always referenced, so there
> is this build error with CONFIG_IPV6 not defined:
>
> net/bridge/br_multicast.c: In function ‘__br_multicast_enable_port’:
> net/bridge/br_multicast.c:1743:3: error: implicit declaration of function ‘br_ip6_multicast_add_router’; did you mean ‘br_ip4_multicast_add_router’? [-Werror=implicit-function-declaration]
> 1743 | br_ip6_multicast_add_router(br, port);
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> | br_ip4_multicast_add_router
> net/bridge/br_multicast.c: At top level:
> net/bridge/br_multicast.c:2804:13: warning: conflicting types for ‘br_ip6_multicast_add_router’
> 2804 | static void br_ip6_multicast_add_router(struct net_bridge *br,
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> net/bridge/br_multicast.c:2804:13: error: static declaration of ‘br_ip6_multicast_add_router’ follows non-static declaration
> net/bridge/br_multicast.c:1743:3: note: previous implicit declaration of ‘br_ip6_multicast_add_router’ was here
> 1743 | br_ip6_multicast_add_router(br, port);
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> [...]
Here is the summary with links:
- [net-next] net: bridge: fix build when IPv6 is disabled
https://git.kernel.org/netdev/net-next/c/30515832e987
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-05-14 17:40 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-14 1:53 [PATCH net-next] net: bridge: fix build when IPv6 is disabled Matteo Croce
2021-05-14 7:26 ` Nikolay Aleksandrov
2021-05-14 9:24 ` Linus Lüssing
2021-05-14 17:40 ` patchwork-bot+netdevbpf
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).