diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2020-03-13 17:42:09 +0300 |
---|---|---|
committer | Chuck Lever <chuck.lever@oracle.com> | 2020-11-30 21:00:21 +0300 |
commit | 5a7e702670adc368caa1b64c2138956d8cba0d4f (patch) | |
tree | ae7ad2649c7f5ffd17c33e41140da3e6fd5316fd /net/sunrpc/xdr.c | |
parent | e5decb2eb5f4d1f64ba9196b4bad0e26a441c81c (diff) | |
download | linux-5a7e702670adc368caa1b64c2138956d8cba0d4f.tar.xz |
SUNRPC: Adjust synopsis of xdr_buf_subsegment()
Clean up: This enables xdr_buf_subsegment()'s callers to pass in a
const pointer to that buffer.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'net/sunrpc/xdr.c')
-rw-r--r-- | net/sunrpc/xdr.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/net/sunrpc/xdr.c b/net/sunrpc/xdr.c index 71e03b930b70..28f81769a27c 100644 --- a/net/sunrpc/xdr.c +++ b/net/sunrpc/xdr.c @@ -1379,9 +1379,8 @@ EXPORT_SYMBOL_GPL(xdr_buf_from_iov); * * Returns -1 if base of length are out of bounds. */ -int -xdr_buf_subsegment(struct xdr_buf *buf, struct xdr_buf *subbuf, - unsigned int base, unsigned int len) +int xdr_buf_subsegment(const struct xdr_buf *buf, struct xdr_buf *subbuf, + unsigned int base, unsigned int len) { subbuf->buflen = subbuf->len = len; if (base < buf->head[0].iov_len) { |