[NET]: Annotate callers of the reset of checksum.h stuff.
authorAl Viro <viro@zeniv.linux.org.uk>
Wed, 15 Nov 2006 05:36:54 +0000 (21:36 -0800)
committerDavid S. Miller <davem@sunset.davemloft.net>
Sun, 3 Dec 2006 05:23:34 +0000 (21:23 -0800)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/skbuff.c
net/ipv4/icmp.c
net/ipv4/ip_gre.c
net/ipv6/icmp.c
net/ipv6/raw.c
net/sunrpc/socklib.c

index da6683f4b31dbf5ddf1a674193819857cfc28a78..6e8c15b39eb8fce7e71c7f7256e46ca06b0b1a2d 100644 (file)
@@ -1294,7 +1294,7 @@ unsigned int skb_checksum(const struct sk_buff *skb, int offset,
 
                        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,
index cb9da0842b77e3407ec94ab636a4b022f4adc7a5..40cf0d0e1b83c21d4f2ba675aea2b764ab027550 100644 (file)
@@ -332,7 +332,7 @@ static int icmp_glue_bits(void *from, char *to, int offset, int len, int odd,
                          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,
index 2bf54adee8c2d219a71bcb3a7ae71c2c3d35ac3f..476cb6084c75047026980d44d7ba43b4da39a0cd 100644 (file)
@@ -877,7 +877,7 @@ static int ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev)
                }
                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));
                }
        }
 
index 4ab8acf37b545e9fb72d5890666098d56c0f6eda..3dcc4b7f41b4cc65e5e7386842323f8d98938c8a 100644 (file)
@@ -262,7 +262,7 @@ static int icmpv6_getfrag(void *from, char *to, int offset, int len, int odd, st
 {
        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);
index cee5db27e8b45360ed402af3f6c4288941577dcd..9b21d67ca48cffee487a187e083be8f49b6aabdf 100644 (file)
@@ -530,7 +530,7 @@ static int rawv6_push_pending_frames(struct sock *sk, struct flowi *fl,
 
        /* 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,
index 61a038fc30cffef93b4042b003d44b047d613d8f..2635c543ba067979f4d31b95227117d1451ded73 100644 (file)
@@ -45,7 +45,8 @@ static size_t skb_read_bits(skb_reader_t *desc, void *to, size_t len)
  */
 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 @@ int csum_partial_copy_to_xdr(struct xdr_buf *xdr, struct sk_buff *skb)
        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);
        }