summaryrefslogtreecommitdiffstats
path: root/net/sunrpc
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2022-06-07 22:48:05 +0200
committerChuck Lever <chuck.lever@oracle.com>2022-06-08 18:39:37 +0200
commit90d871b3b9bb7ef8f835d6b53095f01b9c74b7b3 (patch)
treef75f067bf96079bd732aaf19366e9a5c167078b8 /net/sunrpc
parentSUNRPC: Optimize xdr_reserve_space() (diff)
downloadlinux-90d871b3b9bb7ef8f835d6b53095f01b9c74b7b3.tar.xz
linux-90d871b3b9bb7ef8f835d6b53095f01b9c74b7b3.zip
SUNRPC: Clean up xdr_commit_encode()
Both the kvec::iov_len field and the third parameter of memcpy() and memmove() are size_t. There's no reason for the implicit conversion from size_t to int and back. Change the type of @shift to make the code easier to read and understand. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Reviewed-by: NeilBrown <neilb@suse.de> Reviewed-by: J. Bruce Fields <bfields@fieldses.org>
Diffstat (limited to 'net/sunrpc')
-rw-r--r--net/sunrpc/xdr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sunrpc/xdr.c b/net/sunrpc/xdr.c
index 1ad8b4ef14de..3c182041e790 100644
--- a/net/sunrpc/xdr.c
+++ b/net/sunrpc/xdr.c
@@ -933,7 +933,7 @@ EXPORT_SYMBOL_GPL(xdr_init_encode);
*/
void __xdr_commit_encode(struct xdr_stream *xdr)
{
- int shift = xdr->scratch.iov_len;
+ size_t shift = xdr->scratch.iov_len;
void *page;
page = page_address(*xdr->page_ptr);