diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2015-12-06 16:49:22 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2015-12-06 20:42:15 -0500 |
commit | 36f7a8a4cd2e99b7172ab8ed2130c5c841466824 (patch) | |
tree | 61c1e5e58d83de0c0b0a834c9715c40c3a2617db /lib/iov_iter.c | |
parent | 527e9316f8ec44bd53d90fb9f611fa7ffff52bb9 (diff) | |
download | linux-stable-36f7a8a4cd2e99b7172ab8ed2130c5c841466824.tar.gz linux-stable-36f7a8a4cd2e99b7172ab8ed2130c5c841466824.tar.bz2 linux-stable-36f7a8a4cd2e99b7172ab8ed2130c5c841466824.zip |
iov_iter: constify {csum_and_,}copy_to_iter()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'lib/iov_iter.c')
-rw-r--r-- | lib/iov_iter.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/iov_iter.c b/lib/iov_iter.c index 75232ad0a5e7..bc6d85cc2036 100644 --- a/lib/iov_iter.c +++ b/lib/iov_iter.c @@ -369,7 +369,7 @@ static void memcpy_from_page(char *to, struct page *page, size_t offset, size_t kunmap_atomic(from); } -static void memcpy_to_page(struct page *page, size_t offset, char *from, size_t len) +static void memcpy_to_page(struct page *page, size_t offset, const char *from, size_t len) { char *to = kmap_atomic(page); memcpy(to + offset, from, len); @@ -383,9 +383,9 @@ static void memzero_page(struct page *page, size_t offset, size_t len) kunmap_atomic(addr); } -size_t copy_to_iter(void *addr, size_t bytes, struct iov_iter *i) +size_t copy_to_iter(const void *addr, size_t bytes, struct iov_iter *i) { - char *from = addr; + const char *from = addr; if (unlikely(bytes > i->count)) bytes = i->count; @@ -704,10 +704,10 @@ size_t csum_and_copy_from_iter(void *addr, size_t bytes, __wsum *csum, } EXPORT_SYMBOL(csum_and_copy_from_iter); -size_t csum_and_copy_to_iter(void *addr, size_t bytes, __wsum *csum, +size_t csum_and_copy_to_iter(const void *addr, size_t bytes, __wsum *csum, struct iov_iter *i) { - char *from = addr; + const char *from = addr; __wsum sum, next; size_t off = 0; if (unlikely(bytes > i->count)) |