From: Chuck Lever Date: Fri, 13 Mar 2020 14:42:10 +0000 (-0400) Subject: svcrdma: Const-ify the xdr_buf arguments X-Git-Tag: accepted/tizen/unified/20230118.172025~8293^2~128 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=51bad8cc1301f14ebf6840a6d8098520553ed5d5;p=platform%2Fkernel%2Flinux-rpi.git svcrdma: Const-ify the xdr_buf arguments Clean up: Ensure the code in rw.c does not modify the argument, and enable callers to also use "const struct xdr_buf *". Signed-off-by: Chuck Lever --- diff --git a/net/sunrpc/xprtrdma/svc_rdma_rw.c b/net/sunrpc/xprtrdma/svc_rdma_rw.c index 7c50edd..aeed4e2 100644 --- a/net/sunrpc/xprtrdma/svc_rdma_rw.c +++ b/net/sunrpc/xprtrdma/svc_rdma_rw.c @@ -197,7 +197,7 @@ struct svc_rdma_write_info { __be32 *wi_segs; /* SGL constructor arguments */ - struct xdr_buf *wi_xdr; + const struct xdr_buf *wi_xdr; unsigned char *wi_base; unsigned int wi_next_off; @@ -405,7 +405,7 @@ static void svc_rdma_pagelist_to_sg(struct svc_rdma_write_info *info, struct svc_rdma_rw_ctxt *ctxt) { unsigned int sge_no, sge_bytes, page_off, page_no; - struct xdr_buf *xdr = info->wi_xdr; + const struct xdr_buf *xdr = info->wi_xdr; struct scatterlist *sg; struct page **page;