Skip to content

Commit cb002d0

Browse files
Sagi GrimbergChristoph Hellwig
authored andcommitted
iov_iter: pass void csum pointer to csum_and_copy_to_iter
The single caller to csum_and_copy_to_iter is skb_copy_and_csum_datagram and we are trying to unite its logic with skb_copy_datagram_iter by passing a callback to the copy function that we want to apply. Thus, we need to make the checksum pointer private to the function. Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sagi Grimberg <sagi@lightbitslabs.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
1 parent 0fc0779 commit cb002d0

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

include/linux/uio.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ static inline void iov_iter_reexpand(struct iov_iter *i, size_t count)
266266
{
267267
i->count = count;
268268
}
269-
size_t csum_and_copy_to_iter(const void *addr, size_t bytes, __wsum *csum, struct iov_iter *i);
269+
size_t csum_and_copy_to_iter(const void *addr, size_t bytes, void *csump, struct iov_iter *i);
270270
size_t csum_and_copy_from_iter(void *addr, size_t bytes, __wsum *csum, struct iov_iter *i);
271271
bool csum_and_copy_from_iter_full(void *addr, size_t bytes, __wsum *csum, struct iov_iter *i);
272272

lib/iov_iter.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1464,10 +1464,11 @@ bool csum_and_copy_from_iter_full(void *addr, size_t bytes, __wsum *csum,
14641464
}
14651465
EXPORT_SYMBOL(csum_and_copy_from_iter_full);
14661466

1467-
size_t csum_and_copy_to_iter(const void *addr, size_t bytes, __wsum *csum,
1467+
size_t csum_and_copy_to_iter(const void *addr, size_t bytes, void *csump,
14681468
struct iov_iter *i)
14691469
{
14701470
const char *from = addr;
1471+
__wsum *csum = csump;
14711472
__wsum sum, next;
14721473
size_t off = 0;
14731474

0 commit comments

Comments
 (0)