Skip to content

Commit beae9eb

Browse files
KAGA-KOKOjgunthorpe
authored andcommitted
RDMA/ocrdma: Make ocrdma_destroy_qp() easier to analyze
This patch does not change any functionality but avoids that sparse reports the following: drivers/infiniband/hw/ocrdma/ocrdma_verbs.c:1818:31: warning: context imbalance in 'ocrdma_destroy_qp' - different lock contexts for basic block Compile-tested only. Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com> Cc: Selvin Xavier <selvin.xavier@broadcom.com> Cc: Devesh Sharma <devesh.sharma@broadcom.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
1 parent 07f3355 commit beae9eb

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

drivers/infiniband/hw/ocrdma/ocrdma_verbs.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1774,13 +1774,13 @@ int ocrdma_destroy_qp(struct ib_qp *ibqp)
17741774
* protect against proessing in-flight CQEs for this QP.
17751775
*/
17761776
spin_lock_irqsave(&qp->sq_cq->cq_lock, flags);
1777-
if (qp->rq_cq && (qp->rq_cq != qp->sq_cq))
1777+
if (qp->rq_cq && (qp->rq_cq != qp->sq_cq)) {
17781778
spin_lock(&qp->rq_cq->cq_lock);
1779-
1780-
ocrdma_del_qpn_map(dev, qp);
1781-
1782-
if (qp->rq_cq && (qp->rq_cq != qp->sq_cq))
1779+
ocrdma_del_qpn_map(dev, qp);
17831780
spin_unlock(&qp->rq_cq->cq_lock);
1781+
} else {
1782+
ocrdma_del_qpn_map(dev, qp);
1783+
}
17841784
spin_unlock_irqrestore(&qp->sq_cq->cq_lock, flags);
17851785

17861786
if (!pd->uctx) {

0 commit comments

Comments
 (0)