diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2020-07-10 20:07:10 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2020-08-20 15:45:13 -0400 |
commit | 8d5930dfb7edbf136f2d9900be34ca7af4ba38c1 (patch) | |
tree | 907ac83ca0b3f85725ffff737f4f96a4554dc059 /net/core/skbuff.c | |
parent | 9123e3a74ec7b934a4a099e98af6a61c2f80bbf5 (diff) | |
download | lwn-8d5930dfb7edbf136f2d9900be34ca7af4ba38c1.tar.gz lwn-8d5930dfb7edbf136f2d9900be34ca7af4ba38c1.zip |
skb_copy_and_csum_bits(): don't bother with the last argument
it's always 0
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'net/core/skbuff.c')
-rw-r--r-- | net/core/skbuff.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 7e2e502ef519..6e806da2913e 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -2723,19 +2723,20 @@ EXPORT_SYMBOL(skb_checksum); /* Both of above in one bottle. */ __wsum skb_copy_and_csum_bits(const struct sk_buff *skb, int offset, - u8 *to, int len, __wsum csum) + u8 *to, int len) { int start = skb_headlen(skb); int i, copy = start - offset; struct sk_buff *frag_iter; int pos = 0; + __wsum csum = 0; /* Copy header. */ if (copy > 0) { if (copy > len) copy = len; csum = csum_partial_copy_nocheck(skb->data + offset, to, - copy, csum); + copy, 0); if ((len -= copy) == 0) return csum; offset += copy; @@ -2791,7 +2792,7 @@ __wsum skb_copy_and_csum_bits(const struct sk_buff *skb, int offset, copy = len; csum2 = skb_copy_and_csum_bits(frag_iter, offset - start, - to, copy, 0); + to, copy); csum = csum_block_add(csum, csum2, pos); if ((len -= copy) == 0) return csum; @@ -3011,7 +3012,7 @@ void skb_copy_and_csum_dev(const struct sk_buff *skb, u8 *to) csum = 0; if (csstart != skb->len) csum = skb_copy_and_csum_bits(skb, csstart, to + csstart, - skb->len - csstart, 0); + skb->len - csstart); if (skb->ip_summed == CHECKSUM_PARTIAL) { long csstuff = csstart + skb->csum_offset; @@ -3932,7 +3933,7 @@ normal: skb_copy_and_csum_bits(head_skb, offset, skb_put(nskb, len), - len, 0); + len); SKB_GSO_CB(nskb)->csum_start = skb_headroom(nskb) + doffset; } else { |