diff options
author | Nicolas Dichtel <nicolas.dichtel@6wind.com> | 2012-10-22 19:35:06 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-10-23 13:03:45 -0400 |
commit | b3ce5ae1fb6ba45c70e7c4d144182d38f0b0aef7 (patch) | |
tree | e1c639e36137fe431afd1e1060dad26e252991ae /net/ipv6/route.c | |
parent | be7164467372a829e5730696b7162b10bc4c8403 (diff) |
ipv6: fix sparse warnings in rt6_info_hash_nhsfn()
Adding by commit 51ebd3181572 which adds the support of ECMP for IPv6.
Spotted-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/route.c')
-rw-r--r-- | net/ipv6/route.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 126da562d3eb..c42650cf8d4d 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c | |||
@@ -397,32 +397,32 @@ static int rt6_info_hash_nhsfn(unsigned int candidate_count, | |||
397 | { | 397 | { |
398 | unsigned int val = fl6->flowi6_proto; | 398 | unsigned int val = fl6->flowi6_proto; |
399 | 399 | ||
400 | val ^= fl6->daddr.s6_addr32[0]; | 400 | val ^= (__force u32)fl6->daddr.s6_addr32[0]; |
401 | val ^= fl6->daddr.s6_addr32[1]; | 401 | val ^= (__force u32)fl6->daddr.s6_addr32[1]; |
402 | val ^= fl6->daddr.s6_addr32[2]; | 402 | val ^= (__force u32)fl6->daddr.s6_addr32[2]; |
403 | val ^= fl6->daddr.s6_addr32[3]; | 403 | val ^= (__force u32)fl6->daddr.s6_addr32[3]; |
404 | 404 | ||
405 | val ^= fl6->saddr.s6_addr32[0]; | 405 | val ^= (__force u32)fl6->saddr.s6_addr32[0]; |
406 | val ^= fl6->saddr.s6_addr32[1]; | 406 | val ^= (__force u32)fl6->saddr.s6_addr32[1]; |
407 | val ^= fl6->saddr.s6_addr32[2]; | 407 | val ^= (__force u32)fl6->saddr.s6_addr32[2]; |
408 | val ^= fl6->saddr.s6_addr32[3]; | 408 | val ^= (__force u32)fl6->saddr.s6_addr32[3]; |
409 | 409 | ||
410 | /* Work only if this not encapsulated */ | 410 | /* Work only if this not encapsulated */ |
411 | switch (fl6->flowi6_proto) { | 411 | switch (fl6->flowi6_proto) { |
412 | case IPPROTO_UDP: | 412 | case IPPROTO_UDP: |
413 | case IPPROTO_TCP: | 413 | case IPPROTO_TCP: |
414 | case IPPROTO_SCTP: | 414 | case IPPROTO_SCTP: |
415 | val ^= fl6->fl6_sport; | 415 | val ^= (__force u16)fl6->fl6_sport; |
416 | val ^= fl6->fl6_dport; | 416 | val ^= (__force u16)fl6->fl6_dport; |
417 | break; | 417 | break; |
418 | 418 | ||
419 | case IPPROTO_ICMPV6: | 419 | case IPPROTO_ICMPV6: |
420 | val ^= fl6->fl6_icmp_type; | 420 | val ^= (__force u16)fl6->fl6_icmp_type; |
421 | val ^= fl6->fl6_icmp_code; | 421 | val ^= (__force u16)fl6->fl6_icmp_code; |
422 | break; | 422 | break; |
423 | } | 423 | } |
424 | /* RFC6438 recommands to use flowlabel */ | 424 | /* RFC6438 recommands to use flowlabel */ |
425 | val ^= fl6->flowlabel; | 425 | val ^= (__force u32)fl6->flowlabel; |
426 | 426 | ||
427 | /* Perhaps, we need to tune, this function? */ | 427 | /* Perhaps, we need to tune, this function? */ |
428 | val = val ^ (val >> 7) ^ (val >> 12); | 428 | val = val ^ (val >> 7) ^ (val >> 12); |