Skip to content

Commit

Permalink
SUNRPC: Remove dprintk call sites in rpcbind XDR functions
Browse files Browse the repository at this point in the history
Clean up: Other XDR functions no longer have dprintk call sites.
These were added during development and can be removed now that
the code is mature.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
  • Loading branch information
Chuck Lever authored and Anna Schumaker committed Sep 21, 2020
1 parent ac1ae53 commit 15a798d
Showing 1 changed file with 1 addition and 27 deletions.
28 changes: 1 addition & 27 deletions net/sunrpc/rpcb_clnt.c
Original file line number Diff line number Diff line change
Expand Up @@ -840,11 +840,6 @@ static void rpcb_enc_mapping(struct rpc_rqst *req, struct xdr_stream *xdr,
const struct rpcbind_args *rpcb = data;
__be32 *p;

dprintk("RPC: %5u encoding PMAP_%s call (%u, %u, %d, %u)\n",
req->rq_task->tk_pid,
req->rq_task->tk_msg.rpc_proc->p_name,
rpcb->r_prog, rpcb->r_vers, rpcb->r_prot, rpcb->r_port);

p = xdr_reserve_space(xdr, RPCB_mappingargs_sz << 2);
*p++ = cpu_to_be32(rpcb->r_prog);
*p++ = cpu_to_be32(rpcb->r_vers);
Expand All @@ -866,8 +861,6 @@ static int rpcb_dec_getport(struct rpc_rqst *req, struct xdr_stream *xdr,
return -EIO;

port = be32_to_cpup(p);
dprintk("RPC: %5u PMAP_%s result: %lu\n", req->rq_task->tk_pid,
req->rq_task->tk_msg.rpc_proc->p_name, port);
if (unlikely(port > USHRT_MAX))
return -EIO;

Expand All @@ -888,11 +881,6 @@ static int rpcb_dec_set(struct rpc_rqst *req, struct xdr_stream *xdr,
*boolp = 0;
if (*p != xdr_zero)
*boolp = 1;

dprintk("RPC: %5u RPCB_%s call %s\n",
req->rq_task->tk_pid,
req->rq_task->tk_msg.rpc_proc->p_name,
(*boolp ? "succeeded" : "failed"));
return 0;
}

Expand All @@ -917,12 +905,6 @@ static void rpcb_enc_getaddr(struct rpc_rqst *req, struct xdr_stream *xdr,
const struct rpcbind_args *rpcb = data;
__be32 *p;

dprintk("RPC: %5u encoding RPCB_%s call (%u, %u, '%s', '%s')\n",
req->rq_task->tk_pid,
req->rq_task->tk_msg.rpc_proc->p_name,
rpcb->r_prog, rpcb->r_vers,
rpcb->r_netid, rpcb->r_addr);

p = xdr_reserve_space(xdr, (RPCB_program_sz + RPCB_version_sz) << 2);
*p++ = cpu_to_be32(rpcb->r_prog);
*p = cpu_to_be32(rpcb->r_vers);
Expand Down Expand Up @@ -952,20 +934,15 @@ static int rpcb_dec_getaddr(struct rpc_rqst *req, struct xdr_stream *xdr,
* If the returned universal address is a null string,
* the requested RPC service was not registered.
*/
if (len == 0) {
dprintk("RPC: %5u RPCB reply: program not registered\n",
req->rq_task->tk_pid);
if (len == 0)
return 0;
}

if (unlikely(len > RPCBIND_MAXUADDRLEN))
goto out_fail;

p = xdr_inline_decode(xdr, len);
if (unlikely(p == NULL))
goto out_fail;
dprintk("RPC: %5u RPCB_%s reply: %*pE\n", req->rq_task->tk_pid,
req->rq_task->tk_msg.rpc_proc->p_name, len, (char *)p);

if (rpc_uaddr2sockaddr(req->rq_xprt->xprt_net, (char *)p, len,
sap, sizeof(address)) == 0)
Expand All @@ -975,9 +952,6 @@ static int rpcb_dec_getaddr(struct rpc_rqst *req, struct xdr_stream *xdr,
return 0;

out_fail:
dprintk("RPC: %5u malformed RPCB_%s reply\n",
req->rq_task->tk_pid,
req->rq_task->tk_msg.rpc_proc->p_name);
return -EIO;
}

Expand Down

0 comments on commit 15a798d

Please sign in to comment.