mirror of
https://github.com/torvalds/linux.git
synced 2024-11-27 06:31:52 +00:00
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>
This commit is contained in:
parent
e5decb2eb5
commit
5a7e702670
@ -183,7 +183,8 @@ xdr_adjust_iovec(struct kvec *iov, __be32 *p)
|
||||
*/
|
||||
extern void xdr_shift_buf(struct xdr_buf *, size_t);
|
||||
extern void xdr_buf_from_iov(struct kvec *, struct xdr_buf *);
|
||||
extern int xdr_buf_subsegment(struct xdr_buf *, struct xdr_buf *, unsigned int, unsigned int);
|
||||
extern int xdr_buf_subsegment(const struct xdr_buf *buf, struct xdr_buf *subbuf,
|
||||
unsigned int base, unsigned int len);
|
||||
extern void xdr_buf_trim(struct xdr_buf *, unsigned int);
|
||||
extern int read_bytes_from_xdr_buf(struct xdr_buf *, unsigned int, void *, unsigned int);
|
||||
extern int write_bytes_to_xdr_buf(struct xdr_buf *, unsigned int, void *, unsigned int);
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user