diff options
Diffstat (limited to 'net/ipv4/ip_output.c')
-rw-r--r-- | net/ipv4/ip_output.c | 8 |
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 | ||
693 | static inline unsigned int | 693 | static inline __wsum |
694 | csum_page(struct page *page, int offset, int copy) | 694 | csum_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 | } |