diff options
author | Eric Dumazet <edumazet@google.com> | 2013-06-12 17:11:16 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-06-12 17:14:55 -0400 |
commit | c70eba74532a9b54583689fead6e2e8f3a86e1c5 (patch) | |
tree | db6a1d797a34fc345a6561a3c05c3307f90bf595 /net/ipv4 | |
parent | 5eaedf31319d5f80eaaee1eec8dd18c0b452f0d1 (diff) |
igmp: fix new sparse errors
Fix following sparse errors :
net/ipv4/igmp.c:1222:25: warning: cast from restricted __be32
net/ipv4/igmp.c:1234:31: warning: incorrect type in assignment (different address spaces)
net/ipv4/igmp.c:1234:31: expected struct ip_mc_list [noderef] <asn:4>*next_hash
net/ipv4/igmp.c:1234:31: got struct ip_mc_list *<noident>
net/ipv4/igmp.c:1250:31: warning: incorrect type in assignment (different address spaces)
net/ipv4/igmp.c:1250:31: expected struct ip_mc_list [noderef] <asn:4>*next_hash
net/ipv4/igmp.c:1250:31: got struct ip_mc_list *<noident>
net/ipv4/igmp.c:2380:37: warning: cast from restricted __be32
These were added by commit e9897071350bd9
("igmp: hash a hash table to speedup ip_check_mc_rcu()")
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/igmp.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c index a09190ddffba..cd71190d2962 100644 --- a/net/ipv4/igmp.c +++ b/net/ipv4/igmp.c | |||
@@ -1219,7 +1219,7 @@ static void igmp_group_added(struct ip_mc_list *im) | |||
1219 | 1219 | ||
1220 | static u32 ip_mc_hash(const struct ip_mc_list *im) | 1220 | static u32 ip_mc_hash(const struct ip_mc_list *im) |
1221 | { | 1221 | { |
1222 | return hash_32((u32)im->multiaddr, MC_HASH_SZ_LOG); | 1222 | return hash_32((__force u32)im->multiaddr, MC_HASH_SZ_LOG); |
1223 | } | 1223 | } |
1224 | 1224 | ||
1225 | static void ip_mc_hash_add(struct in_device *in_dev, | 1225 | static void ip_mc_hash_add(struct in_device *in_dev, |
@@ -1231,7 +1231,7 @@ static void ip_mc_hash_add(struct in_device *in_dev, | |||
1231 | mc_hash = rtnl_dereference(in_dev->mc_hash); | 1231 | mc_hash = rtnl_dereference(in_dev->mc_hash); |
1232 | if (mc_hash) { | 1232 | if (mc_hash) { |
1233 | hash = ip_mc_hash(im); | 1233 | hash = ip_mc_hash(im); |
1234 | im->next_hash = rtnl_dereference(mc_hash[hash]); | 1234 | im->next_hash = mc_hash[hash]; |
1235 | rcu_assign_pointer(mc_hash[hash], im); | 1235 | rcu_assign_pointer(mc_hash[hash], im); |
1236 | return; | 1236 | return; |
1237 | } | 1237 | } |
@@ -1247,7 +1247,7 @@ static void ip_mc_hash_add(struct in_device *in_dev, | |||
1247 | 1247 | ||
1248 | for_each_pmc_rtnl(in_dev, im) { | 1248 | for_each_pmc_rtnl(in_dev, im) { |
1249 | hash = ip_mc_hash(im); | 1249 | hash = ip_mc_hash(im); |
1250 | im->next_hash = rtnl_dereference(mc_hash[hash]); | 1250 | im->next_hash = mc_hash[hash]; |
1251 | RCU_INIT_POINTER(mc_hash[hash], im); | 1251 | RCU_INIT_POINTER(mc_hash[hash], im); |
1252 | } | 1252 | } |
1253 | 1253 | ||
@@ -2377,7 +2377,7 @@ int ip_check_mc_rcu(struct in_device *in_dev, __be32 mc_addr, __be32 src_addr, u | |||
2377 | 2377 | ||
2378 | mc_hash = rcu_dereference(in_dev->mc_hash); | 2378 | mc_hash = rcu_dereference(in_dev->mc_hash); |
2379 | if (mc_hash) { | 2379 | if (mc_hash) { |
2380 | u32 hash = hash_32((u32)mc_addr, MC_HASH_SZ_LOG); | 2380 | u32 hash = hash_32((__force u32)mc_addr, MC_HASH_SZ_LOG); |
2381 | 2381 | ||
2382 | for (im = rcu_dereference(mc_hash[hash]); | 2382 | for (im = rcu_dereference(mc_hash[hash]); |
2383 | im != NULL; | 2383 | im != NULL; |