aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/ip_output.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2006-11-15 00:36:14 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-12-03 00:23:32 -0500
commit44bb93633f57a55979f3c2589b10fd6a2bfc7c08 (patch)
tree09dff6f9e3c9d21c8d06f3a1ec73609a1942c9da /net/ipv4/ip_output.c
parent868c86bcb5bdea7ed8d45979b17bb919af9254db (diff)
[NET]: Annotate csum_partial() callers in net/*
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/ip_output.c')
-rw-r--r--net/ipv4/ip_output.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
index 5f3e35c03637..f9194f7e39d3 100644
--- a/net/ipv4/ip_output.c
+++ b/net/ipv4/ip_output.c
@@ -682,7 +682,7 @@ ip_generic_getfrag(void *from, char *to, int offset, int len, int odd, struct sk
682 if (memcpy_fromiovecend(to, iov, offset, len) < 0) 682 if (memcpy_fromiovecend(to, iov, offset, len) < 0)
683 return -EFAULT; 683 return -EFAULT;
684 } else { 684 } else {
685 unsigned int csum = 0; 685 __wsum csum = 0;
686 if (csum_partial_copy_fromiovecend(to, iov, offset, len, &csum) < 0) 686 if (csum_partial_copy_fromiovecend(to, iov, offset, len, &csum) < 0)
687 return -EFAULT; 687 return -EFAULT;
688 skb->csum = csum_block_add(skb->csum, csum, odd); 688 skb->csum = csum_block_add(skb->csum, csum, odd);
@@ -690,11 +690,11 @@ ip_generic_getfrag(void *from, char *to, int offset, int len, int odd, struct sk
690 return 0; 690 return 0;
691} 691}
692 692
693static inline unsigned int 693static inline __wsum
694csum_page(struct page *page, int offset, int copy) 694csum_page(struct page *page, int offset, int copy)
695{ 695{
696 char *kaddr; 696 char *kaddr;
697 unsigned int csum; 697 __wsum csum;
698 kaddr = kmap(page); 698 kaddr = kmap(page);
699 csum = csum_partial(kaddr + offset, copy, 0); 699 csum = csum_partial(kaddr + offset, copy, 0);
700 kunmap(page); 700 kunmap(page);
@@ -1166,7 +1166,7 @@ ssize_t ip_append_page(struct sock *sk, struct page *page,
1166 } 1166 }
1167 1167
1168 if (skb->ip_summed == CHECKSUM_NONE) { 1168 if (skb->ip_summed == CHECKSUM_NONE) {
1169 unsigned int csum; 1169 __wsum csum;
1170 csum = csum_page(page, offset, len); 1170 csum = csum_page(page, offset, len);
1171 skb->csum = csum_block_add(skb->csum, csum, skb->len); 1171 skb->csum = csum_block_add(skb->csum, csum, skb->len);
1172 } 1172 }