ipv4: remove sparse error in ip_neigh_gw4()
Subsystems (3)
PATCH 1/1 ipv4: remove sparse error in ip_neigh_gw4()
From: Eric Dumazet <[email protected]>
./include/net/route.h:373:48: warning: incorrect type in argument 2 (different base types)./include/net/route.h:373:48: expected unsigned int [usertype] key./include/net/route.h:373:48: got restricted __be32 [usertype] daddr
--- include/net/route.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/net/route.h +1 -1
@@ -370,7 +370,7 @@ static inline struct neighbour *ip_neigh_gw4(struct net_device *dev, {struct neighbour *neigh; - neigh =__ipv4_neigh_lookup_noref (dev, daddr); + neigh =__ipv4_neigh_lookup_noref (dev, (__force u32 )daddr);if (unlikely (!neigh)) neigh =__neigh_create (&arp_tbl, &daddr, dev, false);
Signature · 1 line
2.35.0.rc0.227.g00780c9af4-goog
Quoted 18 lines · Eric Dumazet
From: Eric Dumazet <[email protected]>
./include/net/route.h:373:48: warning: incorrect type in argument 2 (different base types)./include/net/route.h:373:48: expected unsigned int [usertype] key./include/net/route.h:373:48: got restricted__be32[usertype] daddrFixes 5c9f7c1dfc2e ("ipv4: Add helpers for neigh lookup for nexthop")Signed-off-by Eric Dumazet <[email protected]>Cc David Ahern <[email protected]>--- include/net/route.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)include/net/route.h +0
-0
include/net/route.h static inline struct neighbour *ip_neigh_gw4(struct net_device *dev, · line 376
Quoted 8 lines
include/net/route.h +1
-1@@ -370,7 +370,7 @@ static inline struct neighbour *ip_neigh_gw4(struct net_device *dev, {struct neighbour *neigh; - neigh =__ipv4_neigh_lookup_noref (dev, daddr); + neigh =__ipv4_neigh_lookup_noref (dev, (__force u32 )daddr);if (unlikely (!neigh)) neigh =__neigh_create (&arp_tbl, &daddr, dev, false);
I think __ipv4_neigh_lookup_noref can be changed to __be32 and remove the (__force u32) from a couple of callers, but more like net-next material.
This patch was applied to netdev/net.git (master) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net.git (master)
by Jakub Kicinski <[email protected]>:
Quoted 11 lines · On Wed, 26 Jan 2022 17:34:04 -0800 you wrote:
From: Eric Dumazet <[email protected]>
./include/net/route.h:373:48: warning: incorrect type in argument 2 (different base types)./include/net/route.h:373:48: expected unsigned int [usertype] key./include/net/route.h:373:48: got restricted__be32[usertype] daddrFixes 5c9f7c1dfc2e ("ipv4: Add helpers for neigh lookup for nexthop")Signed-off-by Eric Dumazet <[email protected]>Cc David Ahern <[email protected]>[...]
Here is the summary with links:
- [net] ipv4: remove sparse error in ip_neigh_gw4()
https://git.kernel.org/netdev/net/c/3c42b2019863
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html