linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chuck Lever <chuck.lever@oracle.com>
To: linux-rdma@vger.kernel.org, linux-nfs@vger.kernel.org
Subject: [PATCH v2 10/10] svcrdma: Further clean-up of svc_rdma_get_inv_rkey()
Date: Fri, 18 Nov 2016 10:11:31 -0500	[thread overview]
Message-ID: <20161118151130.13658.36018.stgit@klimt.1015granger.net> (raw)
In-Reply-To: <20161118145940.13658.59105.stgit@klimt.1015granger.net>

No longer any need for the dprintk().

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
 net/sunrpc/xprtrdma/svc_rdma_sendto.c |   19 +++++--------------
 1 file changed, 5 insertions(+), 14 deletions(-)

diff --git a/net/sunrpc/xprtrdma/svc_rdma_sendto.c b/net/sunrpc/xprtrdma/svc_rdma_sendto.c
index 30eeab5..ad4d286 100644
--- a/net/sunrpc/xprtrdma/svc_rdma_sendto.c
+++ b/net/sunrpc/xprtrdma/svc_rdma_sendto.c
@@ -199,31 +199,22 @@ static u32 svc_rdma_get_inv_rkey(struct rpcrdma_msg *rdma_argp,
 {
 	struct rpcrdma_read_chunk *rd_ary;
 	struct rpcrdma_segment *arg_ch;
-	u32 inv_rkey;
-
-	inv_rkey = 0;
 
 	rd_ary = (struct rpcrdma_read_chunk *)&rdma_argp->rm_body.rm_chunks[0];
-	if (rd_ary->rc_discrim != xdr_zero) {
-		inv_rkey = be32_to_cpu(rd_ary->rc_target.rs_handle);
-		goto out;
-	}
+	if (rd_ary->rc_discrim != xdr_zero)
+		return be32_to_cpu(rd_ary->rc_target.rs_handle);
 
 	if (wr_ary && be32_to_cpu(wr_ary->wc_nchunks)) {
 		arg_ch = &wr_ary->wc_array[0].wc_target;
-		inv_rkey = be32_to_cpu(arg_ch->rs_handle);
-		goto out;
+		return be32_to_cpu(arg_ch->rs_handle);
 	}
 
 	if (rp_ary && be32_to_cpu(rp_ary->wc_nchunks)) {
 		arg_ch = &rp_ary->wc_array[0].wc_target;
-		inv_rkey = be32_to_cpu(arg_ch->rs_handle);
-		goto out;
+		return be32_to_cpu(arg_ch->rs_handle);
 	}
 
-out:
-	dprintk("svcrdma: Send With Invalidate rkey=%08x\n", inv_rkey);
-	return inv_rkey;
+	return 0;
 }
 
 /* Assumptions:


      parent reply	other threads:[~2016-11-18 15:11 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-18 15:10 [PATCH v2 00/10] Server-side NFS/RDMA patches proposed for v4.10 Chuck Lever
2016-11-18 15:10 ` [PATCH v2 01/10] svcrdma: Clear xpt_bc_xps in xprt_setup_rdma_bc() error exit arm Chuck Lever
2016-11-18 15:10 ` [PATCH v2 02/10] svcauth_gss: Close connection when dropping an incoming message Chuck Lever
2016-11-18 15:10 ` [PATCH v2 03/10] svcrdma: Renovate sendto chunk list parsing Chuck Lever
2016-11-18 15:10 ` [PATCH v2 04/10] svcrdma: Remove BH-disabled spin locking in svc_rdma_send() Chuck Lever
2016-11-18 15:10 ` [PATCH v2 05/10] svcrdma: Remove DMA map accounting Chuck Lever
2016-11-18 15:10 ` [PATCH v2 06/10] svcrdma: Remove svc_rdma_op_ctxt::wc_status Chuck Lever
2016-11-18 15:11 ` [PATCH v2 07/10] svcrdma: Remove unused variables in xprt_rdma_bc_allocate() Chuck Lever
2016-11-18 15:11 ` [PATCH v2 08/10] svcrdma: Remove unused variable in rdma_copy_tail() Chuck Lever
2016-11-18 15:11 ` [PATCH v2 09/10] svcrdma: Break up dprintk format in svc_rdma_accept() Chuck Lever
2016-11-18 15:11 ` Chuck Lever [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161118151130.13658.36018.stgit@klimt.1015granger.net \
    --to=chuck.lever@oracle.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).