mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
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>
This commit is contained in:
committed by
Jakub Kicinski
parent
20c20f05cf
commit
f296b73d17
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user