* [PATCH v3 net-next] ipvlan: fix sparse warning about __be32 -> u32
@ 2025-11-21 15:51 Dmitry Skorodumov
2025-11-25 4:00 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Dmitry Skorodumov @ 2025-11-21 15:51 UTC (permalink / raw)
To: netdev, Dmitry Skorodumov, Jakub Kicinski, Eric Dumazet,
Julian Vetter, Guillaume Nault, linux-kernel
Cc: Andrew Lunn, David S. Miller, Paolo Abeni
Fixed a sparse warning:
ipvlan_core.c:56: warning: incorrect type in argument 1
(different base types) expected unsigned int [usertype] a
got restricted __be32 const [usertype] s_addr
Force cast the s_addr to u32
Signed-off-by: Dmitry Skorodumov <skorodumov.dmitry@huawei.com>
---
drivers/net/ipvlan/ipvlan_core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ipvlan/ipvlan_core.c b/drivers/net/ipvlan/ipvlan_core.c
index d7e3ddbcab6f..dea411e132db 100644
--- a/drivers/net/ipvlan/ipvlan_core.c
+++ b/drivers/net/ipvlan/ipvlan_core.c
@@ -52,8 +52,8 @@ static u8 ipvlan_get_v4_hash(const void *iaddr)
{
const struct in_addr *ip4_addr = iaddr;
- return jhash_1word(ip4_addr->s_addr, ipvlan_jhash_secret) &
- IPVLAN_HASH_MASK;
+ return jhash_1word((__force u32)ip4_addr->s_addr, ipvlan_jhash_secret) &
+ IPVLAN_HASH_MASK;
}
static bool addr_equal(bool is_v6, struct ipvl_addr *addr, const void *iaddr)
--
2.25.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH v3 net-next] ipvlan: fix sparse warning about __be32 -> u32
2025-11-21 15:51 [PATCH v3 net-next] ipvlan: fix sparse warning about __be32 -> u32 Dmitry Skorodumov
@ 2025-11-25 4:00 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-11-25 4:00 UTC (permalink / raw)
To: Dmitry Skorodumov
Cc: netdev, kuba, edumazet, julian, gnault, linux-kernel,
andrew+netdev, davem, pabeni
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Fri, 21 Nov 2025 18:51:08 +0300 you wrote:
> Fixed a sparse warning:
>
> ipvlan_core.c:56: warning: incorrect type in argument 1
> (different base types) expected unsigned int [usertype] a
> got restricted __be32 const [usertype] s_addr
>
> Force cast the s_addr to u32
>
> [...]
Here is the summary with links:
- [v3,net-next] ipvlan: fix sparse warning about __be32 -> u32
https://git.kernel.org/netdev/net-next/c/f296b73d17a4
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] 2+ messages in thread
end of thread, other threads:[~2025-11-25 4:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-11-21 15:51 [PATCH v3 net-next] ipvlan: fix sparse warning about __be32 -> u32 Dmitry Skorodumov
2025-11-25 4:00 ` 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
all inboxes | Powered by JetHome®