ipv4: eliminate endianness warnings in ip_fib.h
authorLance Richardson <lrichard@redhat.com>
Wed, 6 Jan 2016 22:22:46 +0000 (17:22 -0500)
committerDavid S. Miller <davem@davemloft.net>
Sat, 9 Jan 2016 02:30:43 +0000 (21:30 -0500)
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>
include/net/ip_fib.h

index 9f4df68105ab28eecdeb9d799a83910b73142a06..7029527725ddbb80f7b78e66565b69ad8aad5806 100644 (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);