summaryrefslogtreecommitdiff
path: root/net/smc/smc_wr.c
diff options
context:
space:
mode:
authorBart Van Assche <bart.vanassche@wdc.com>2018-07-18 09:25:30 -0700
committerJason Gunthorpe <jgg@mellanox.com>2018-07-24 16:06:37 -0600
commit2e3bbe46b4a18d16314dab0c0efdba0c079a5ed0 (patch)
tree85a5194d0fcdcc330334030a1b20f8d0be2316c9 /net/smc/smc_wr.c
parent12c36dcfd6f48ece2fce4dc8e6ce68224d005d37 (diff)
downloadlinux-2e3bbe46b4a18d16314dab0c0efdba0c079a5ed0.tar.gz
net/smc: 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: Bart Van Assche <bart.vanassche@wdc.com> Acked-by: Ursula Braun <ubraun@linux.ibm.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'net/smc/smc_wr.c')
-rw-r--r--net/smc/smc_wr.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/net/smc/smc_wr.c b/net/smc/smc_wr.c
index 8b9bdd9bc615..de1a438cf977 100644
--- a/net/smc/smc_wr.c
+++ b/net/smc/smc_wr.c
@@ -240,15 +240,13 @@ int smc_wr_tx_put_slot(struct smc_link *link,
*/
int smc_wr_tx_send(struct smc_link *link, struct smc_wr_tx_pend_priv *priv)
{
- struct ib_send_wr *failed_wr = NULL;
struct smc_wr_tx_pend *pend;
int rc;
ib_req_notify_cq(link->smcibdev->roce_cq_send,
IB_CQ_NEXT_COMP | IB_CQ_REPORT_MISSED_EVENTS);
pend = container_of(priv, struct smc_wr_tx_pend, priv);
- rc = ib_post_send(link->roce_qp, &link->wr_tx_ibs[pend->idx],
- &failed_wr);
+ rc = ib_post_send(link->roce_qp, &link->wr_tx_ibs[pend->idx], NULL);
if (rc) {
struct smc_link_group *lgr =
container_of(link, struct smc_link_group,
@@ -263,7 +261,6 @@ int smc_wr_tx_send(struct smc_link *link, struct smc_wr_tx_pend_priv *priv)
/* Register a memory region and wait for result. */
int smc_wr_reg_send(struct smc_link *link, struct ib_mr *mr)
{
- struct ib_send_wr *failed_wr = NULL;
int rc;
ib_req_notify_cq(link->smcibdev->roce_cq_send,
@@ -272,8 +269,7 @@ int smc_wr_reg_send(struct smc_link *link, struct ib_mr *mr)
link->wr_reg.wr.wr_id = (u64)(uintptr_t)mr;
link->wr_reg.mr = mr;
link->wr_reg.key = mr->rkey;
- failed_wr = &link->wr_reg.wr;
- rc = ib_post_send(link->roce_qp, &link->wr_reg.wr, &failed_wr);
+ rc = ib_post_send(link->roce_qp, &link->wr_reg.wr, NULL);
if (rc)
return rc;