ipv4: eliminate endianness warnings in ip_fib.h

fib_multipath_hash() computes a hash using __be32 values, force
cast these to u32 to pacify sparse.

Signed-off-by: Lance Richardson <lrichard@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Lance Richardson 2016-01-06 17:22:46 -05:00 committed by David S. Miller
parent 30d3d83a7d
commit 0797cbd8e2
1 changed files with 2 additions and 1 deletions

View File

@ -325,7 +325,8 @@ extern u32 fib_multipath_secret __read_mostly;
static inline int fib_multipath_hash(__be32 saddr, __be32 daddr)
{
return jhash_2words(saddr, daddr, fib_multipath_secret) >> 1;
return jhash_2words((__force u32)saddr, (__force u32)daddr,
fib_multipath_secret) >> 1;
}
void fib_select_multipath(struct fib_result *res, int hash);