* [PATCH net] ipv4: remove sparse error in ip_neigh_gw4()
@ 2022-01-27 1:34 Eric Dumazet
2022-01-27 2:36 ` David Ahern
2022-01-27 17:10 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Eric Dumazet @ 2022-01-27 1:34 UTC (permalink / raw)
To: David S . Miller, Jakub Kicinski
Cc: David Ahern, netdev, Eric Dumazet, Eric Dumazet, David Ahern
From: Eric Dumazet <edumazet@google.com>
./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
Fixes: 5c9f7c1dfc2e ("ipv4: Add helpers for neigh lookup for nexthop")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: David Ahern <dsahern@gmail.com>
---
include/net/route.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/net/route.h b/include/net/route.h
index 4c858dcf1aa8cd1988746e55eb698ad4425fd77b..25404fc2b48374c69081b8c72c2ea1dbbc09ed7f 100644
--- a/include/net/route.h
+++ b/include/net/route.h
@@ -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);
--
2.35.0.rc0.227.g00780c9af4-goog
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net] ipv4: remove sparse error in ip_neigh_gw4()
2022-01-27 1:34 [PATCH net] ipv4: remove sparse error in ip_neigh_gw4() Eric Dumazet
@ 2022-01-27 2:36 ` David Ahern
2022-01-27 17:10 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: David Ahern @ 2022-01-27 2:36 UTC (permalink / raw)
To: Eric Dumazet, David S . Miller, Jakub Kicinski
Cc: David Ahern, netdev, Eric Dumazet
On 1/26/22 6:34 PM, Eric Dumazet wrote:
> From: Eric Dumazet <edumazet@google.com>
>
> ./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
>
> Fixes: 5c9f7c1dfc2e ("ipv4: Add helpers for neigh lookup for nexthop")
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> Cc: David Ahern <dsahern@gmail.com>
> ---
> include/net/route.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/net/route.h b/include/net/route.h
> index 4c858dcf1aa8cd1988746e55eb698ad4425fd77b..25404fc2b48374c69081b8c72c2ea1dbbc09ed7f 100644
> --- a/include/net/route.h
> +++ b/include/net/route.h
> @@ -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.
Reviewed-by: David Ahern <dsahern@kernel.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net] ipv4: remove sparse error in ip_neigh_gw4()
2022-01-27 1:34 [PATCH net] ipv4: remove sparse error in ip_neigh_gw4() Eric Dumazet
2022-01-27 2:36 ` David Ahern
@ 2022-01-27 17:10 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-01-27 17:10 UTC (permalink / raw)
To: Eric Dumazet; +Cc: davem, kuba, dsahern, netdev, edumazet, dsahern
Hello:
This patch was applied to netdev/net.git (master)
by Jakub Kicinski <kuba@kernel.org>:
On Wed, 26 Jan 2022 17:34:04 -0800 you wrote:
> From: Eric Dumazet <edumazet@google.com>
>
> ./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
>
> Fixes: 5c9f7c1dfc2e ("ipv4: Add helpers for neigh lookup for nexthop")
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> Cc: David Ahern <dsahern@gmail.com>
>
> [...]
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!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-01-27 17:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-27 1:34 [PATCH net] ipv4: remove sparse error in ip_neigh_gw4() Eric Dumazet
2022-01-27 2:36 ` David Ahern
2022-01-27 17:10 ` 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).