summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLance Richardson <lrichard@redhat.com>2016-01-07 01:22:46 +0300
committerDavid S. Miller <davem@davemloft.net>2016-01-09 05:30:43 +0300
commit0797cbd8e2741c69a4d416d8f669639a064db8d1 (patch)
tree620a7224a4852ac094e08079ea503bce566cb6ff
parent30d3d83a7dcef7a26c5c48e548bdd6a76754cbcd (diff)
downloadlinux-0797cbd8e2741c69a4d416d8f669639a064db8d1.tar.xz
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>
-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);