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>
This commit is contained in:
Chuck Lever 2022-06-07 16:48:05 -04:00
parent 62ed448cc5
commit 90d871b3b9
1 changed files with 1 additions and 1 deletions

View File

@ -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);