Commit 90d871b3 authored by Chuck Lever's avatar Chuck Lever

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: default avatarChuck Lever <chuck.lever@oracle.com>
Reviewed-by: default avatarNeilBrown <neilb@suse.de>
Reviewed-by: default avatarJ. Bruce Fields <bfields@fieldses.org>
parent 62ed448c
...@@ -933,7 +933,7 @@ EXPORT_SYMBOL_GPL(xdr_init_encode); ...@@ -933,7 +933,7 @@ EXPORT_SYMBOL_GPL(xdr_init_encode);
*/ */
void __xdr_commit_encode(struct xdr_stream *xdr) void __xdr_commit_encode(struct xdr_stream *xdr)
{ {
int shift = xdr->scratch.iov_len; size_t shift = xdr->scratch.iov_len;
void *page; void *page;
page = page_address(*xdr->page_ptr); page = page_address(*xdr->page_ptr);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment