aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2016-11-29 11:05:39 -0500
committerJ. Bruce Fields <bfields@redhat.com>2016-11-30 17:31:16 -0500
commitfafedf81700d7d694b3716a14bc55bf4227344c7 (patch)
treeef35cb7d8665d48dff535cdeb897feae18c7bb0d
parent07257450208b82b75103abcca34c6678f5ce51ad (diff)
svcrdma: Further clean-up of svc_rdma_get_inv_rkey()
No longer any need for the dprintk(). Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
-rw-r--r--net/sunrpc/xprtrdma/svc_rdma_sendto.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/net/sunrpc/xprtrdma/svc_rdma_sendto.c b/net/sunrpc/xprtrdma/svc_rdma_sendto.c
index 30eeab527bd0..ad4d286a83c5 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,
199{ 199{
200 struct rpcrdma_read_chunk *rd_ary; 200 struct rpcrdma_read_chunk *rd_ary;
201 struct rpcrdma_segment *arg_ch; 201 struct rpcrdma_segment *arg_ch;
202 u32 inv_rkey;
203
204 inv_rkey = 0;
205 202
206 rd_ary = (struct rpcrdma_read_chunk *)&rdma_argp->rm_body.rm_chunks[0]; 203 rd_ary = (struct rpcrdma_read_chunk *)&rdma_argp->rm_body.rm_chunks[0];
207 if (rd_ary->rc_discrim != xdr_zero) { 204 if (rd_ary->rc_discrim != xdr_zero)
208 inv_rkey = be32_to_cpu(rd_ary->rc_target.rs_handle); 205 return be32_to_cpu(rd_ary->rc_target.rs_handle);
209 goto out;
210 }
211 206
212 if (wr_ary && be32_to_cpu(wr_ary->wc_nchunks)) { 207 if (wr_ary && be32_to_cpu(wr_ary->wc_nchunks)) {
213 arg_ch = &wr_ary->wc_array[0].wc_target; 208 arg_ch = &wr_ary->wc_array[0].wc_target;
214 inv_rkey = be32_to_cpu(arg_ch->rs_handle); 209 return be32_to_cpu(arg_ch->rs_handle);
215 goto out;
216 } 210 }
217 211
218 if (rp_ary && be32_to_cpu(rp_ary->wc_nchunks)) { 212 if (rp_ary && be32_to_cpu(rp_ary->wc_nchunks)) {
219 arg_ch = &rp_ary->wc_array[0].wc_target; 213 arg_ch = &rp_ary->wc_array[0].wc_target;
220 inv_rkey = be32_to_cpu(arg_ch->rs_handle); 214 return be32_to_cpu(arg_ch->rs_handle);
221 goto out;
222 } 215 }
223 216
224out: 217 return 0;
225 dprintk("svcrdma: Send With Invalidate rkey=%08x\n", inv_rkey);
226 return inv_rkey;
227} 218}
228 219
229/* Assumptions: 220/* Assumptions: