]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
sunrpc: properly type argument to kxdreproc_t
authorChristoph Hellwig <hch@lst.de>
Mon, 8 May 2017 07:31:19 +0000 (09:31 +0200)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Thu, 13 Jul 2017 19:57:52 +0000 (15:57 -0400)
Pass struct rpc_request as the first argument instead of an untyped blob,
and mark the data object as const.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Jeff Layton <jlayton@redhat.com>
include/linux/sunrpc/xdr.h
net/sunrpc/clnt.c

index 054c8cde18f33bb1179fa1c90c699c9a120db7a5..290f189de2009da69a99d51b232d05f95256b924 100644 (file)
@@ -17,6 +17,8 @@
 #include <asm/unaligned.h>
 #include <linux/scatterlist.h>
 
+struct rpc_rqst;
+
 /*
  * Buffer adjustment
  */
@@ -222,7 +224,8 @@ struct xdr_stream {
 /*
  * These are the xdr_stream style generic XDR encode and decode functions.
  */
-typedef void   (*kxdreproc_t)(void *rqstp, struct xdr_stream *xdr, void *obj);
+typedef void   (*kxdreproc_t)(struct rpc_rqst *rqstp, struct xdr_stream *xdr,
+               const void *obj);
 typedef int    (*kxdrdproc_t)(void *rqstp, struct xdr_stream *xdr, void *obj);
 
 extern void xdr_init_encode(struct xdr_stream *xdr, struct xdr_buf *buf, __be32 *p);
index b5cb921775a0b20358f590b69b4cdfd0609a1acb..9fee20dc0c8093b0e8719dd86c01b010e96ab8a7 100644 (file)
@@ -2476,7 +2476,8 @@ out_overflow:
        goto out_garbage;
 }
 
-static void rpcproc_encode_null(void *rqstp, struct xdr_stream *xdr, void *obj)
+static void rpcproc_encode_null(struct rpc_rqst *rqstp, struct xdr_stream *xdr,
+               const void *obj)
 {
 }