diff options
author | Eric Dumazet <edumazet@google.com> | 2015-02-04 18:03:25 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-02-05 03:42:28 -0500 |
commit | 677651462c774b5866be2bc42601303a76b021a0 (patch) | |
tree | f09982498c42c7af3ba526e7447a4fd75448fd7c | |
parent | 2ce1ee1780564ba06ab4c1434aa03e347dc9169f (diff) |
ipv6: fix sparse errors in ip6_make_flowlabel()
include/net/ipv6.h:713:22: warning: incorrect type in assignment (different base types)
include/net/ipv6.h:713:22: expected restricted __be32 [usertype] hash
include/net/ipv6.h:713:22: got unsigned int
include/net/ipv6.h:719:25: warning: restricted __be32 degrades to integer
include/net/ipv6.h:719:22: warning: invalid assignment: ^=
include/net/ipv6.h:719:22: left side has type restricted __be32
include/net/ipv6.h:719:22: right side has type unsigned int
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | include/net/ipv6.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/net/ipv6.h b/include/net/ipv6.h index 9bf85d34c024..6e416f6d3e3c 100644 --- a/include/net/ipv6.h +++ b/include/net/ipv6.h | |||
@@ -711,7 +711,7 @@ static inline __be32 ip6_make_flowlabel(struct net *net, struct sk_buff *skb, | |||
711 | __be32 flowlabel, bool autolabel) | 711 | __be32 flowlabel, bool autolabel) |
712 | { | 712 | { |
713 | if (!flowlabel && (autolabel || net->ipv6.sysctl.auto_flowlabels)) { | 713 | if (!flowlabel && (autolabel || net->ipv6.sysctl.auto_flowlabels)) { |
714 | __be32 hash; | 714 | u32 hash; |
715 | 715 | ||
716 | hash = skb_get_hash(skb); | 716 | hash = skb_get_hash(skb); |
717 | 717 | ||
@@ -721,7 +721,7 @@ static inline __be32 ip6_make_flowlabel(struct net *net, struct sk_buff *skb, | |||
721 | */ | 721 | */ |
722 | hash ^= hash >> 12; | 722 | hash ^= hash >> 12; |
723 | 723 | ||
724 | flowlabel = hash & IPV6_FLOWLABEL_MASK; | 724 | flowlabel = (__force __be32)hash & IPV6_FLOWLABEL_MASK; |
725 | } | 725 | } |
726 | 726 | ||
727 | return flowlabel; | 727 | return flowlabel; |