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

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: default avatarBart Van Assche <bart.vanassche@wdc.com>
Cc: Selvin Xavier <selvin.xavier@broadcom.com>
Cc: Devesh Sharma <devesh.sharma@broadcom.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
parent 07f3355d
...@@ -1774,13 +1774,13 @@ int ocrdma_destroy_qp(struct ib_qp *ibqp) ...@@ -1774,13 +1774,13 @@ int ocrdma_destroy_qp(struct ib_qp *ibqp)
* protect against proessing in-flight CQEs for this QP. * protect against proessing in-flight CQEs for this QP.
*/ */
spin_lock_irqsave(&qp->sq_cq->cq_lock, flags); spin_lock_irqsave(&qp->sq_cq->cq_lock, flags);
if (qp->rq_cq && (qp->rq_cq != qp->sq_cq)) if (qp->rq_cq && (qp->rq_cq != qp->sq_cq)) {
spin_lock(&qp->rq_cq->cq_lock); spin_lock(&qp->rq_cq->cq_lock);
ocrdma_del_qpn_map(dev, qp); ocrdma_del_qpn_map(dev, qp);
if (qp->rq_cq && (qp->rq_cq != qp->sq_cq))
spin_unlock(&qp->rq_cq->cq_lock); spin_unlock(&qp->rq_cq->cq_lock);
} else {
ocrdma_del_qpn_map(dev, qp);
}
spin_unlock_irqrestore(&qp->sq_cq->cq_lock, flags); spin_unlock_irqrestore(&qp->sq_cq->cq_lock, flags);
if (!pd->uctx) { if (!pd->uctx) {
......
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