IB/rdmavt: Annotate rvt_reset_qp()
authorBart Van Assche <bart.vanassche@sandisk.com>
Fri, 3 Jun 2016 19:09:16 +0000 (12:09 -0700)
committerDoug Ledford <dledford@redhat.com>
Mon, 6 Jun 2016 23:36:21 +0000 (19:36 -0400)
This patch avoids that sparse reports the following warning:

rdmavt/qp.c:507:17: warning: context imbalance in 'rvt_reset_qp' - unexpected unlock

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Cc: Mike Marciniszyn <mike.marciniszyn@intel.com>
Cc: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/sw/rdmavt/qp.c

index 5fa4d4d81ee0cfcc5389897c904e343ff4903897..7de5134bec851987b83249247b14cc1a6d49cc4d 100644 (file)
@@ -502,6 +502,12 @@ static void rvt_remove_qp(struct rvt_dev_info *rdi, struct rvt_qp *qp)
  */
 static void rvt_reset_qp(struct rvt_dev_info *rdi, struct rvt_qp *qp,
                  enum ib_qp_type type)
+       __releases(&qp->s_lock)
+       __releases(&qp->s_hlock)
+       __releases(&qp->r_lock)
+       __acquires(&qp->r_lock)
+       __acquires(&qp->s_hlock)
+       __acquires(&qp->s_lock)
 {
        if (qp->state != IB_QPS_RESET) {
                qp->state = IB_QPS_RESET;