summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorBart Van Assche <bart.vanassche@wdc.com>2018-07-18 19:25:16 +0300
committerJason Gunthorpe <jgg@mellanox.com>2018-07-25 01:06:36 +0300
commitbb039a870c0593a4deaa72c2693d02a87723305c (patch)
treebe41f9a9e486028a1170012ec3d0b3bee8dd33a5 /include
parent536ca245c512aedfd84cde072d7b3ca14b6e1792 (diff)
downloadlinux-bb039a870c0593a4deaa72c2693d02a87723305c.tar.xz
IB/core: Allow ULPs to specify NULL as the third ib_post_(send|recv|srq_recv)() argument
This patch does not change the behavior of the modified functions. Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'include')
-rw-r--r--include/rdma/ib_verbs.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h
index b626aa2310c5..99bcf64a4762 100644
--- a/include/rdma/ib_verbs.h
+++ b/include/rdma/ib_verbs.h
@@ -3278,7 +3278,9 @@ static inline int ib_post_srq_recv(struct ib_srq *srq,
struct ib_recv_wr *recv_wr,
struct ib_recv_wr **bad_recv_wr)
{
- return srq->device->post_srq_recv(srq, recv_wr, bad_recv_wr);
+ struct ib_recv_wr *dummy;
+
+ return srq->device->post_srq_recv(srq, recv_wr, bad_recv_wr ? : &dummy);
}
/**
@@ -3379,7 +3381,9 @@ static inline int ib_post_send(struct ib_qp *qp,
struct ib_send_wr *send_wr,
struct ib_send_wr **bad_send_wr)
{
- return qp->device->post_send(qp, send_wr, bad_send_wr);
+ struct ib_send_wr *dummy;
+
+ return qp->device->post_send(qp, send_wr, bad_send_wr ? : &dummy);
}
/**
@@ -3394,7 +3398,9 @@ static inline int ib_post_recv(struct ib_qp *qp,
struct ib_recv_wr *recv_wr,
struct ib_recv_wr **bad_recv_wr)
{
- return qp->device->post_recv(qp, recv_wr, bad_recv_wr);
+ struct ib_recv_wr *dummy;
+
+ return qp->device->post_recv(qp, recv_wr, bad_recv_wr ? : &dummy);
}
struct ib_cq *__ib_alloc_cq(struct ib_device *dev, void *private,