RDMA/cxgb3: Annotate locking assumptions
authorBart Van Assche <bart.vanassche@wdc.com>
Wed, 11 Oct 2017 17:48:50 +0000 (10:48 -0700)
committerDoug Ledford <dledford@redhat.com>
Sun, 15 Oct 2017 00:47:05 +0000 (20:47 -0400)
Tell sparse what the locking assumptions are for __flush_qp() such
that it does not complain about the locking operations inside that
function.

Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
Reviewed-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/cxgb3/iwch_qp.c

index 7f633da0185d93a993a26e1105b2efb52f12816d..3871e1fd839524bda987037e995e03ea7d9c1d27 100644 (file)
@@ -722,10 +722,13 @@ int iwch_post_terminate(struct iwch_qp *qhp, struct respQ_msg_t *rsp_msg)
  */
 static void __flush_qp(struct iwch_qp *qhp, struct iwch_cq *rchp,
                                struct iwch_cq *schp)
+       __releases(&qhp->lock)
+       __acquires(&qhp->lock)
 {
        int count;
        int flushed;
 
+       lockdep_assert_held(&qhp->lock);
 
        pr_debug("%s qhp %p rchp %p schp %p\n", __func__, qhp, rchp, schp);
        /* take a ref on the qhp since we must release the lock */