diff options
author | Johannes Berg <johannes.berg@intel.com> | 2016-08-12 08:48:21 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-11-10 18:41:34 +0300 |
commit | 997a4944ce4fdfc5a0ce3adee367ca5daff48244 (patch) | |
tree | 72ca7e9ac33c34d5336552be78e54442d3b5355e /include | |
parent | 9aae17f851e2828de33fa4330cf519397c9aa2bf (diff) | |
download | linux-997a4944ce4fdfc5a0ce3adee367ca5daff48244.tar.xz |
ipv6: suppress sparse warnings in IP6_ECN_set_ce()
[ Upstream commit c15c0ab12fd62f2b19181d05c62d24bc9fa55a42 ]
Pass the correct type __wsum to csum_sub() and csum_add(). This doesn't
really change anything since __wsum really *is* __be32, but removes the
address space warnings from sparse.
Cc: Eric Dumazet <edumazet@google.com>
Fixes: 34ae6a1aa054 ("ipv6: update skb->csum when CE mark is propagated")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/inet_ecn.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/net/inet_ecn.h b/include/net/inet_ecn.h index 0dc0a51da38f..dce2d586d9ce 100644 --- a/include/net/inet_ecn.h +++ b/include/net/inet_ecn.h @@ -128,7 +128,8 @@ static inline int IP6_ECN_set_ce(struct sk_buff *skb, struct ipv6hdr *iph) to = from | htonl(INET_ECN_CE << 20); *(__be32 *)iph = to; if (skb->ip_summed == CHECKSUM_COMPLETE) - skb->csum = csum_add(csum_sub(skb->csum, from), to); + skb->csum = csum_add(csum_sub(skb->csum, (__force __wsum)from), + (__force __wsum)to); return 1; } |