sunrpc: properly type argument to kxdreproc_t

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>
This commit is contained in:
Christoph Hellwig 2017-05-08 09:31:19 +02:00 committed by Anna Schumaker
parent 32c1431eea
commit 0aebdc52ca
2 changed files with 6 additions and 2 deletions

View file

@ -17,6 +17,8 @@
#include <asm/unaligned.h> #include <asm/unaligned.h>
#include <linux/scatterlist.h> #include <linux/scatterlist.h>
struct rpc_rqst;
/* /*
* Buffer adjustment * Buffer adjustment
*/ */
@ -222,7 +224,8 @@ struct xdr_stream {
/* /*
* These are the xdr_stream style generic XDR encode and decode functions. * 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); 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); extern void xdr_init_encode(struct xdr_stream *xdr, struct xdr_buf *buf, __be32 *p);

View file

@ -2476,7 +2476,8 @@ out_overflow:
goto out_garbage; 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)
{ {
} }