diff mbox

[net-next] ipv6: fix a sparse warning

Message ID 1361218732.19353.105.camel@edumazet-glaptop
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Eric Dumazet Feb. 18, 2013, 8:18 p.m. UTC
From: Eric Dumazet <edumazet@google.com>

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>
---
 net/ipv6/reassembly.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)



--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

David Miller Feb. 18, 2013, 8:28 p.m. UTC | #1
From: Eric Dumazet <erdnetdev@gmail.com>
Date: Mon, 18 Feb 2013 12:18:52 -0800

> From: Eric Dumazet <edumazet@google.com>
> 
> 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>

Applied, thanks Eric.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/net/ipv6/reassembly.c b/net/ipv6/reassembly.c
index 9a6428a..3c6a772 100644
--- a/net/ipv6/reassembly.c
+++ b/net/ipv6/reassembly.c
@@ -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);
 }