Skip to contentSkip to conversation

fib: make netdev_switch_fib_ipv4_abort in header file static inline

PATCH Applied Willem de Bruijn 3 participants 3 messages Mar 6, 2015

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fib: make netdev_switch_fib_ipv4_abort in header file static inline

From: Willem de Bruijn <[email protected]>

When building without CONFIG_NET_SWITCHDEV, netdev_switch_fib_ipv4_abort is defined in the header file. It must be static inline to avoid build failure at link time.

Fixes 8e05fd7166c6 ("fib: hook IPv4 fib for hardware offload")
---
 include/net/switchdev.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/net/switchdev.h +1 -1
index dc0a5cc..933fac4 100644
@@ -129,7 +129,7 @@ static inline int netdev_switch_fib_ipv4_del(u32 dst, int dst_len,
 	return 0;
 }
 
-void netdev_switch_fib_ipv4_abort(struct fib_info *fi)
+static inline void netdev_switch_fib_ipv4_abort(struct fib_info *fi)
 {
 }
 
Signature · 1 line
2.2.0.rc0.207.ga3a616c
Acked-by on v1 1/1
#1 lore raw
Quoted 18 lines · Willem de Bruijn

From: Willem de Bruijn <[email protected]>

When building without CONFIG_NET_SWITCHDEV, netdev_switch_fib_ipv4_abort is defined in the header file. It must be static inline to avoid build failure at link time.

Fixes 8e05fd7166c6 ("fib: hook IPv4 fib for hardware offload")
---
 include/net/switchdev.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/net/switchdev.h +0 -0
index dc0a5cc..933fac4 100644

include/net/switchdev.h static inline int netdev_switch_fib_ipv4_del(u32 dst, int dst_len, · line 134

Quoted 7 lines
include/net/switchdev.h +1 -1
@@ -129,7 +129,7 @@ static inline int netdev_switch_fib_ipv4_del(u32 dst, int dst_len,
        return 0;
 }
 
-void netdev_switch_fib_ipv4_abort(struct fib_info *fi)
+static inline void netdev_switch_fib_ipv4_abort(struct fib_info *fi)
 {
 }
maintainer Applied
#2 lore raw
In reply to Willem de Bruijn

From: Willem de Bruijn <[email protected]>
Date: Fri, 6 Mar 2015 11:44:28 -0500

Quoted 9 lines

From: Willem de Bruijn <[email protected]>

When building without CONFIG_NET_SWITCHDEV, netdev_switch_fib_ipv4_abort is defined in the header file. It must be static inline to avoid build failure at link time.

Fixes 8e05fd7166c6 ("fib: hook IPv4 fib for hardware offload")

Applied, thanks Willem.