Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ipvlan: fix sparse warning about __be32 -> u32

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>
Link: https://patch.msgid.link/20251121155112.4182007-1-skorodumov.dmitry@huawei.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Dmitry Skorodumov and committed by
Jakub Kicinski
f296b73d 20c20f05

+2 -2
+2 -2
drivers/net/ipvlan/ipvlan_core.c
··· 52 52 { 53 53 const struct in_addr *ip4_addr = iaddr; 54 54 55 - return jhash_1word(ip4_addr->s_addr, ipvlan_jhash_secret) & 56 - IPVLAN_HASH_MASK; 55 + return jhash_1word((__force u32)ip4_addr->s_addr, ipvlan_jhash_secret) & 56 + IPVLAN_HASH_MASK; 57 57 } 58 58 59 59 static bool addr_equal(bool is_v6, struct ipvl_addr *addr, const void *iaddr)