Commit 72bc4d37 authored by Bart Van Assche's avatar Bart Van Assche Committed by Jason Gunthorpe

net/9p: Simplify ib_post_(send|recv|srq_recv)() calls

Instead of declaring and passing a dummy 'bad_wr' pointer, pass NULL
as third argument to ib_post_(send|recv|srq_recv)().
Signed-off-by: default avatarBart Van Assche <bart.vanassche@wdc.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
parent 73930595
...@@ -396,7 +396,7 @@ static int ...@@ -396,7 +396,7 @@ static int
post_recv(struct p9_client *client, struct p9_rdma_context *c) post_recv(struct p9_client *client, struct p9_rdma_context *c)
{ {
struct p9_trans_rdma *rdma = client->trans; struct p9_trans_rdma *rdma = client->trans;
struct ib_recv_wr wr, *bad_wr; struct ib_recv_wr wr;
struct ib_sge sge; struct ib_sge sge;
c->busa = ib_dma_map_single(rdma->cm_id->device, c->busa = ib_dma_map_single(rdma->cm_id->device,
...@@ -415,7 +415,7 @@ post_recv(struct p9_client *client, struct p9_rdma_context *c) ...@@ -415,7 +415,7 @@ post_recv(struct p9_client *client, struct p9_rdma_context *c)
wr.wr_cqe = &c->cqe; wr.wr_cqe = &c->cqe;
wr.sg_list = &sge; wr.sg_list = &sge;
wr.num_sge = 1; wr.num_sge = 1;
return ib_post_recv(rdma->qp, &wr, &bad_wr); return ib_post_recv(rdma->qp, &wr, NULL);
error: error:
p9_debug(P9_DEBUG_ERROR, "EIO\n"); p9_debug(P9_DEBUG_ERROR, "EIO\n");
...@@ -425,7 +425,7 @@ post_recv(struct p9_client *client, struct p9_rdma_context *c) ...@@ -425,7 +425,7 @@ post_recv(struct p9_client *client, struct p9_rdma_context *c)
static int rdma_request(struct p9_client *client, struct p9_req_t *req) static int rdma_request(struct p9_client *client, struct p9_req_t *req)
{ {
struct p9_trans_rdma *rdma = client->trans; struct p9_trans_rdma *rdma = client->trans;
struct ib_send_wr wr, *bad_wr; struct ib_send_wr wr;
struct ib_sge sge; struct ib_sge sge;
int err = 0; int err = 0;
unsigned long flags; unsigned long flags;
...@@ -520,7 +520,7 @@ static int rdma_request(struct p9_client *client, struct p9_req_t *req) ...@@ -520,7 +520,7 @@ static int rdma_request(struct p9_client *client, struct p9_req_t *req)
* status in case of a very fast reply. * status in case of a very fast reply.
*/ */
req->status = REQ_STATUS_SENT; req->status = REQ_STATUS_SENT;
err = ib_post_send(rdma->qp, &wr, &bad_wr); err = ib_post_send(rdma->qp, &wr, NULL);
if (err) if (err)
goto send_error; goto send_error;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment