SUNRPC: Replace the "__be32 *p" parameter to .pc_decode

The passed-in value of the "__be32 *p" parameter is now unused in
every server-side XDR decoder, and can be removed.

Note also that there is a line in each decoder that sets up a local
pointer to a struct xdr_stream. Passing that pointer from the
dispatcher instead saves one line per decoder function.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
This commit is contained in:
Chuck Lever
2021-10-12 11:57:22 -04:00
committed by J. Bruce Fields
parent 5b747a594b
commit 16c663642c
16 changed files with 112 additions and 149 deletions
+10 -9
View File
@@ -96,18 +96,19 @@ struct nlm_reboot {
*/
#define NLMSVC_XDRSIZE sizeof(struct nlm_args)
int nlmsvc_decode_testargs(struct svc_rqst *, __be32 *);
int nlmsvc_decode_void(struct svc_rqst *rqstp, struct xdr_stream *xdr);
int nlmsvc_decode_testargs(struct svc_rqst *rqstp, struct xdr_stream *xdr);
int nlmsvc_decode_lockargs(struct svc_rqst *rqstp, struct xdr_stream *xdr);
int nlmsvc_decode_cancargs(struct svc_rqst *rqstp, struct xdr_stream *xdr);
int nlmsvc_decode_unlockargs(struct svc_rqst *rqstp, struct xdr_stream *xdr);
int nlmsvc_decode_res(struct svc_rqst *rqstp, struct xdr_stream *xdr);
int nlmsvc_decode_reboot(struct svc_rqst *rqstp, struct xdr_stream *xdr);
int nlmsvc_decode_shareargs(struct svc_rqst *rqstp, struct xdr_stream *xdr);
int nlmsvc_decode_notify(struct svc_rqst *rqstp, struct xdr_stream *xdr);
int nlmsvc_encode_testres(struct svc_rqst *, __be32 *);
int nlmsvc_decode_lockargs(struct svc_rqst *, __be32 *);
int nlmsvc_decode_cancargs(struct svc_rqst *, __be32 *);
int nlmsvc_decode_unlockargs(struct svc_rqst *, __be32 *);
int nlmsvc_encode_res(struct svc_rqst *, __be32 *);
int nlmsvc_decode_res(struct svc_rqst *, __be32 *);
int nlmsvc_encode_void(struct svc_rqst *, __be32 *);
int nlmsvc_decode_void(struct svc_rqst *, __be32 *);
int nlmsvc_decode_shareargs(struct svc_rqst *, __be32 *);
int nlmsvc_encode_shareres(struct svc_rqst *, __be32 *);
int nlmsvc_decode_notify(struct svc_rqst *, __be32 *);
int nlmsvc_decode_reboot(struct svc_rqst *, __be32 *);
#endif /* LOCKD_XDR_H */
+9 -10
View File
@@ -22,21 +22,20 @@
#define nlm4_fbig cpu_to_be32(NLM_FBIG)
#define nlm4_failed cpu_to_be32(NLM_FAILED)
int nlm4svc_decode_void(struct svc_rqst *rqstp, struct xdr_stream *xdr);
int nlm4svc_decode_testargs(struct svc_rqst *rqstp, struct xdr_stream *xdr);
int nlm4svc_decode_lockargs(struct svc_rqst *rqstp, struct xdr_stream *xdr);
int nlm4svc_decode_cancargs(struct svc_rqst *rqstp, struct xdr_stream *xdr);
int nlm4svc_decode_unlockargs(struct svc_rqst *rqstp, struct xdr_stream *xdr);
int nlm4svc_decode_res(struct svc_rqst *rqstp, struct xdr_stream *xdr);
int nlm4svc_decode_reboot(struct svc_rqst *rqstp, struct xdr_stream *xdr);
int nlm4svc_decode_shareargs(struct svc_rqst *rqstp, struct xdr_stream *xdr);
int nlm4svc_decode_notify(struct svc_rqst *rqstp, struct xdr_stream *xdr);
int nlm4svc_decode_testargs(struct svc_rqst *, __be32 *);
int nlm4svc_encode_testres(struct svc_rqst *, __be32 *);
int nlm4svc_decode_lockargs(struct svc_rqst *, __be32 *);
int nlm4svc_decode_cancargs(struct svc_rqst *, __be32 *);
int nlm4svc_decode_unlockargs(struct svc_rqst *, __be32 *);
int nlm4svc_encode_res(struct svc_rqst *, __be32 *);
int nlm4svc_decode_res(struct svc_rqst *, __be32 *);
int nlm4svc_encode_void(struct svc_rqst *, __be32 *);
int nlm4svc_decode_void(struct svc_rqst *, __be32 *);
int nlm4svc_decode_shareargs(struct svc_rqst *, __be32 *);
int nlm4svc_encode_shareres(struct svc_rqst *, __be32 *);
int nlm4svc_decode_notify(struct svc_rqst *, __be32 *);
int nlm4svc_decode_reboot(struct svc_rqst *, __be32 *);
extern const struct rpc_version nlm_version4;