All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dennis Dalessandro <dennis.dalessandro-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
To: dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Mike Marciniszyn
	<mike.marciniszyn-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Subject: [PATCH for-next 09/13] IB/rdmavt: Correct sparse annotation
Date: Tue, 06 Sep 2016 04:36:33 -0700	[thread overview]
Message-ID: <20160906113623.27413.51936.stgit@scvm10.sc.intel.com> (raw)
In-Reply-To: <20160906112758.27413.46860.stgit-9QXIwq+3FY+1XWohqUldA0EOCMrvLtNR@public.gmane.org>

From: Mike Marciniszyn <mike.marciniszyn-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>

The __must_hold() is sufficent to correct the sparse
context imbalance inside a function.

Per Documentation/sparse.txt:
__must_hold - The specified lock is held on function entry and exit.

Fixes: Commit c0a67f6ba356 ("IB/rdmavt: Annotate rvt_reset_qp()")
Reviewed-by: Dennis Dalessandro <dennis.dalessandro-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Mike Marciniszyn <mike.marciniszyn-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
 drivers/infiniband/sw/rdmavt/qp.c |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/infiniband/sw/rdmavt/qp.c b/drivers/infiniband/sw/rdmavt/qp.c
index da5c8d6..80d2c50 100644
--- a/drivers/infiniband/sw/rdmavt/qp.c
+++ b/drivers/infiniband/sw/rdmavt/qp.c
@@ -500,12 +500,9 @@ 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)
+	__must_hold(&qp->r_lock)
+	__must_hold(&qp->s_hlock)
+	__must_hold(&qp->s_lock)
 {
 	if (qp->state != IB_QPS_RESET) {
 		qp->state = IB_QPS_RESET;

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2016-09-06 11:36 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-06 11:33 [PATCH for-next 00/13] IB/rdmavt/qib/hfi1/core: First round for 4.9 Dennis Dalessandro
     [not found] ` <20160906112758.27413.46860.stgit-9QXIwq+3FY+1XWohqUldA0EOCMrvLtNR@public.gmane.org>
2016-09-06 11:34   ` [PATCH for-next 01/13] IB/rdmavt: Add functions to get and release QP references Dennis Dalessandro
2016-09-06 11:34   ` [PATCH for-next 02/13] IB/rdmavt, IB/qib, IB/hfi1: Use new QP put get routines Dennis Dalessandro
2016-09-06 11:34   ` [PATCH for-next 03/13] IB/core: Add ib headers for general use Dennis Dalessandro
2016-09-06 11:35   ` [PATCH for-next 04/13] IB/qib,IB/hfi: Use core common header file Dennis Dalessandro
2016-09-06 11:35   ` [PATCH for-next 05/13] IB/hfi1: Move serdes tune inside link start function Dennis Dalessandro
2016-09-06 11:35   ` [PATCH for-next 06/13] IB/hfi1: Fix the count of user packets submitted to an SDMA engine Dennis Dalessandro
2016-09-06 11:35   ` [PATCH for-next 07/13] IB/hfi1: Fix user-space buffers mapping with IOMMU enabled Dennis Dalessandro
2016-09-06 11:36   ` [PATCH for-next 08/13] IB/hfi1: Fix locking scheme for affinity settings Dennis Dalessandro
2016-09-06 11:36   ` Dennis Dalessandro [this message]
2016-09-06 11:36   ` [PATCH for-next 10/13] IB/hfi1: Move iowait_init() to priv allocate Dennis Dalessandro
2016-09-06 11:37   ` [PATCH for-next 11/13] IB/rdmavt: Move reset calldown to reset path Dennis Dalessandro
2016-09-06 11:37   ` [PATCH for-next 12/13] IB/rdmavt: Add qp init function Dennis Dalessandro
2016-09-06 11:37   ` [PATCH for-next 13/13] IB/rdmavt, IB/hfi1: Add lockdep asserts for lock debug Dennis Dalessandro
2016-09-16 18:32   ` [PATCH for-next 00/13] IB/rdmavt/qib/hfi1/core: First round for 4.9 Doug Ledford

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160906113623.27413.51936.stgit@scvm10.sc.intel.com \
    --to=dennis.dalessandro-ral2jqcrhueavxtiumwx3w@public.gmane.org \
    --cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mike.marciniszyn-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.