forked from Minki/linux
RDMA/ocrdma: Fix check of GSI CQs
It looks like one check was accidentally duplicated, and the other 3 checks were left out. This was detected by scripts/coccinelle/tests/doubletest.cocci: drivers/infiniband/hw/ocrdma/ocrdma_verbs.c:895:6-54: duplicated argument to && or || Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
This commit is contained in:
parent
5dedb9f3bd
commit
9e8fa040cb
@ -893,7 +893,9 @@ static int ocrdma_check_qp_params(struct ib_pd *ibpd, struct ocrdma_dev *dev,
|
|||||||
/* verify consumer QPs are not trying to use GSI QP's CQ */
|
/* verify consumer QPs are not trying to use GSI QP's CQ */
|
||||||
if ((attrs->qp_type != IB_QPT_GSI) && (dev->gsi_qp_created)) {
|
if ((attrs->qp_type != IB_QPT_GSI) && (dev->gsi_qp_created)) {
|
||||||
if ((dev->gsi_sqcq == get_ocrdma_cq(attrs->send_cq)) ||
|
if ((dev->gsi_sqcq == get_ocrdma_cq(attrs->send_cq)) ||
|
||||||
(dev->gsi_sqcq == get_ocrdma_cq(attrs->send_cq))) {
|
(dev->gsi_sqcq == get_ocrdma_cq(attrs->recv_cq)) ||
|
||||||
|
(dev->gsi_rqcq == get_ocrdma_cq(attrs->send_cq)) ||
|
||||||
|
(dev->gsi_rqcq == get_ocrdma_cq(attrs->recv_cq))) {
|
||||||
ocrdma_err("%s(%d) Consumer QP cannot use GSI CQs.\n",
|
ocrdma_err("%s(%d) Consumer QP cannot use GSI CQs.\n",
|
||||||
__func__, dev->id);
|
__func__, dev->id);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
Loading…
Reference in New Issue
Block a user