sunrpc: properly type pc_func callbacks

Drop the argp and resp arguments as they can trivially be derived from
the rqstp argument.  With that all functions now have the same prototype,
and we can remove the unsafe casting to svc_procfunc as well as the
svc_procfunc typedef itself.

Signed-off-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
Christoph Hellwig
2017-05-08 17:35:49 +02:00
committed by Anna Schumaker
parent 36ba89c2a4
commit 1c8a5409f3
11 changed files with 328 additions and 227 deletions

View File

@@ -419,9 +419,9 @@ struct svc_version {
/*
* RPC procedure info
*/
typedef __be32 (*svc_procfunc)(struct svc_rqst *, void *argp, void *resp);
struct svc_procedure {
svc_procfunc pc_func; /* process the request */
/* process the request: */
__be32 (*pc_func)(struct svc_rqst *);
kxdrproc_t pc_decode; /* XDR decode args */
kxdrproc_t pc_encode; /* XDR encode result */
kxdrproc_t pc_release; /* XDR free result */