diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2022-06-07 23:48:18 +0300 |
---|---|---|
committer | Chuck Lever <chuck.lever@oracle.com> | 2022-06-08 19:39:37 +0300 |
commit | da9e94fe000e11f21d3d6f66012fe5c6379bd93c (patch) | |
tree | 31c4a219c29292d2cb2a6a3b69bc52f841491a44 /net | |
parent | bd07a64176a2be03f5195c64943063fd119f9f21 (diff) | |
download | linux-da9e94fe000e11f21d3d6f66012fe5c6379bd93c.tar.xz |
SUNRPC: Remove pointer type casts from xdr_get_next_encode_buffer()
To make the code easier to read, remove visual clutter by changing
the declared type of @p.
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')
-rw-r--r-- | net/sunrpc/xdr.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/sunrpc/xdr.c b/net/sunrpc/xdr.c index eca02d122476..f87a2d8f23a7 100644 --- a/net/sunrpc/xdr.c +++ b/net/sunrpc/xdr.c @@ -951,9 +951,9 @@ EXPORT_SYMBOL_GPL(__xdr_commit_encode); static noinline __be32 *xdr_get_next_encode_buffer(struct xdr_stream *xdr, size_t nbytes) { - __be32 *p; int space_left; int frag1bytes, frag2bytes; + void *p; if (nbytes > PAGE_SIZE) goto out_overflow; /* Bigger buffers require special handling */ @@ -982,12 +982,12 @@ static noinline __be32 *xdr_get_next_encode_buffer(struct xdr_stream *xdr, * xdr_commit_encode() has shifted this one back: */ p = page_address(*xdr->page_ptr); - xdr->p = (void *)p + frag2bytes; + xdr->p = p + frag2bytes; space_left = xdr->buf->buflen - xdr->buf->len; if (space_left - nbytes >= PAGE_SIZE) - xdr->end = (void *)p + PAGE_SIZE; + xdr->end = p + PAGE_SIZE; else - xdr->end = (void *)p + space_left - frag1bytes; + xdr->end = p + space_left - frag1bytes; xdr->buf->page_len += frag2bytes; xdr->buf->len += nbytes; |