[NET]: Annotate callers of the reset of checksum.h stuff. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
diff --git a/net/core/skbuff.c b/net/core/skbuff.c index da6683f..6e8c15b 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c
@@ -1294,7 +1294,7 @@ end = start + list->len; if ((copy = end - offset) > 0) { - unsigned int csum2; + __wsum csum2; if (copy > len) copy = len; csum2 = skb_checksum(list, offset - start,
diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c index cb9da08..40cf0d0 100644 --- a/net/ipv4/icmp.c +++ b/net/ipv4/icmp.c
@@ -332,7 +332,7 @@ struct sk_buff *skb) { struct icmp_bxm *icmp_param = (struct icmp_bxm *)from; - unsigned int csum; + __wsum csum; csum = skb_copy_and_csum_bits(icmp_param->skb, icmp_param->offset + offset,
diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c index 2bf54ad..476cb60 100644 --- a/net/ipv4/ip_gre.c +++ b/net/ipv4/ip_gre.c
@@ -877,7 +877,7 @@ } if (tunnel->parms.o_flags&GRE_CSUM) { *ptr = 0; - *(__be16*)ptr = ip_compute_csum((void*)(iph+1), skb->len - sizeof(struct iphdr)); + *(__sum16*)ptr = ip_compute_csum((void*)(iph+1), skb->len - sizeof(struct iphdr)); } }
diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c index 4ab8acf..3dcc4b7 100644 --- a/net/ipv6/icmp.c +++ b/net/ipv6/icmp.c
@@ -262,7 +262,7 @@ { struct icmpv6_msg *msg = (struct icmpv6_msg *) from; struct sk_buff *org_skb = msg->skb; - __u32 csum = 0; + __wsum csum = 0; csum = skb_copy_and_csum_bits(org_skb, msg->offset + offset, to, len, csum);
diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c index cee5db2..9b21d67 100644 --- a/net/ipv6/raw.c +++ b/net/ipv6/raw.c
@@ -530,7 +530,7 @@ /* in case cksum was not initialized */ if (unlikely(csum)) - tmp_csum = csum_sub(tmp_csum, csum); + tmp_csum = csum_sub(tmp_csum, csum_unfold(csum)); csum = csum_ipv6_magic(&fl->fl6_src, &fl->fl6_dst,
diff --git a/net/sunrpc/socklib.c b/net/sunrpc/socklib.c index 61a038f..2635c54 100644 --- a/net/sunrpc/socklib.c +++ b/net/sunrpc/socklib.c
@@ -45,7 +45,8 @@ */ static size_t skb_read_and_csum_bits(skb_reader_t *desc, void *to, size_t len) { - unsigned int csum2, pos; + unsigned int pos; + __wsum csum2; if (len > desc->count) len = desc->count; @@ -160,7 +161,7 @@ if (xdr_partial_copy_from_skb(xdr, 0, &desc, skb_read_and_csum_bits) < 0) return -1; if (desc.offset != skb->len) { - unsigned int csum2; + __wsum csum2; csum2 = skb_checksum(skb, desc.offset, skb->len - desc.offset, 0); desc.csum = csum_block_add(desc.csum, csum2, desc.offset); }