ipv6: fix a sparse warning
authorEric Dumazet <edumazet@google.com>
Mon, 18 Feb 2013 10:18:52 +0000 (10:18 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 18 Feb 2013 20:28:00 +0000 (15:28 -0500)
net/ipv6/reassembly.c:82:72: warning: incorrect type in argument 3 (different base types)
net/ipv6/reassembly.c:82:72:    expected unsigned int [unsigned] [usertype] c
net/ipv6/reassembly.c:82:72:    got restricted __be32 [usertype] id

Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/reassembly.c

index 9a6428aaa2d8f30198b67b71d77b1a8784221781..3c6a77290c6e87573cb07d081d878d5c03f9760c 100644 (file)
@@ -79,7 +79,8 @@ unsigned int inet6_hash_frag(__be32 id, const struct in6_addr *saddr,
 {
        u32 c;
 
-       c = jhash_3words(ipv6_addr_hash(saddr), ipv6_addr_hash(daddr), id, rnd);
+       c = jhash_3words(ipv6_addr_hash(saddr), ipv6_addr_hash(daddr),
+                        (__force u32)id, rnd);
 
        return c & (INETFRAGS_HASHSZ - 1);
 }