Skip to content

Commit da9e94f

Browse files
committed
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 <[email protected]> Reviewed-by: NeilBrown <[email protected]> Reviewed-by: J. Bruce Fields <[email protected]>
1 parent bd07a64 commit da9e94f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

net/sunrpc/xdr.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -951,9 +951,9 @@ EXPORT_SYMBOL_GPL(__xdr_commit_encode);
951951
static noinline __be32 *xdr_get_next_encode_buffer(struct xdr_stream *xdr,
952952
size_t nbytes)
953953
{
954-
__be32 *p;
955954
int space_left;
956955
int frag1bytes, frag2bytes;
956+
void *p;
957957

958958
if (nbytes > PAGE_SIZE)
959959
goto out_overflow; /* Bigger buffers require special handling */
@@ -982,12 +982,12 @@ static noinline __be32 *xdr_get_next_encode_buffer(struct xdr_stream *xdr,
982982
* xdr_commit_encode() has shifted this one back:
983983
*/
984984
p = page_address(*xdr->page_ptr);
985-
xdr->p = (void *)p + frag2bytes;
985+
xdr->p = p + frag2bytes;
986986
space_left = xdr->buf->buflen - xdr->buf->len;
987987
if (space_left - nbytes >= PAGE_SIZE)
988-
xdr->end = (void *)p + PAGE_SIZE;
988+
xdr->end = p + PAGE_SIZE;
989989
else
990-
xdr->end = (void *)p + space_left - frag1bytes;
990+
xdr->end = p + space_left - frag1bytes;
991991

992992
xdr->buf->page_len += frag2bytes;
993993
xdr->buf->len += nbytes;

0 commit comments

Comments
 (0)