summaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorLance Richardson <lrichard@redhat.com>2016-01-06 23:22:46 +0100
committerDavid S. Miller <davem@davemloft.net>2016-01-09 03:30:43 +0100
commit0797cbd8e2741c69a4d416d8f669639a064db8d1 (patch)
tree620a7224a4852ac094e08079ea503bce566cb6ff /include/net
parentipv4: fix endianness warnings in ip_tunnel_core.c (diff)
downloadlinux-0797cbd8e2741c69a4d416d8f669639a064db8d1.tar.xz
linux-0797cbd8e2741c69a4d416d8f669639a064db8d1.zip
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>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/ip_fib.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/net/ip_fib.h b/include/net/ip_fib.h
index 9f4df68105ab..7029527725dd 100644
--- a/include/net/ip_fib.h
+++ b/include/net/ip_fib.h
@@ -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);