IB/rdmavt: Annotate rvt_reset_qp()

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>
This commit is contained in:
Bart Van Assche 2016-06-03 12:09:16 -07:00 committed by Doug Ledford
parent 2190d10de5
commit c0a67f6ba3
1 changed files with 6 additions and 0 deletions

View 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;