linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: linux-scsi@vger.kernel.org
Cc: jth@kernel.org, rt@linutronix.de, jejb@linux.vnet.ibm.com,
	"Martin K . Petersen" <martin.petersen@oracle.com>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	QLogic-Storage-Upstream@qlogic.com,
	Christoph Hellwig <hch@lst.de>
Subject: [PATCH 3/4] scsi: bnx2fc: annoate unlock + release for sparse
Date: Tue,  5 Jul 2016 18:08:48 +0200	[thread overview]
Message-ID: <1467734929-24442-3-git-send-email-bigeasy@linutronix.de> (raw)
In-Reply-To: <1467734929-24442-1-git-send-email-bigeasy@linutronix.de>

The caller of bnx2fc_abts_cleanup() holds the tgt->tgt_lock lock and it
is expected to release the lock during wait_for_completion() and acquire
the lock afterwards.

This patch was only compile-tested due to -ENODEV.

Cc: QLogic-Storage-Upstream@qlogic.com
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
 drivers/scsi/bnx2fc/bnx2fc_io.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/scsi/bnx2fc/bnx2fc_io.c b/drivers/scsi/bnx2fc/bnx2fc_io.c
index f501095f91ac..634e1e539850 100644
--- a/drivers/scsi/bnx2fc/bnx2fc_io.c
+++ b/drivers/scsi/bnx2fc/bnx2fc_io.c
@@ -1080,6 +1080,8 @@ int bnx2fc_eh_device_reset(struct scsi_cmnd *sc_cmd)
 }
 
 static int bnx2fc_abts_cleanup(struct bnx2fc_cmd *io_req)
+__releases(tgt->tgt_lock)
+__acquires(tgt->tgt_lock)
 {
 	struct bnx2fc_rport *tgt = io_req->tgt;
 	int rc = SUCCESS;
-- 
2.8.1


  parent reply	other threads:[~2016-07-05 16:09 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-05 16:08 [PATCH 1/4] scsi: bnx2fc: convert per-CPU thread to kworker Sebastian Andrzej Siewior
2016-07-05 16:08 ` [PATCH 2/4] scsi: bnx2fc: clean up header definitions Sebastian Andrzej Siewior
2016-07-05 16:08 ` Sebastian Andrzej Siewior [this message]
2016-07-05 16:08 ` [PATCH 4/4] scsi: bnx2fc: convert bnx2fc_l2_rcv_thread() to worker Sebastian Andrzej Siewior
2016-07-05 16:20   ` [PATCH 4/4 v2] " Sebastian Andrzej Siewior
2016-07-20 11:04 ` [PATCH 1/4] scsi: bnx2fc: convert per-CPU thread to kworker Johannes Thumshirn
2016-07-20 12:07   ` Sebastian Andrzej Siewior
2016-07-20 12:13     ` Johannes Thumshirn
2016-08-12 11:00 ` Sebastian Andrzej Siewior

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=1467734929-24442-3-git-send-email-bigeasy@linutronix.de \
    --to=bigeasy@linutronix.de \
    --cc=QLogic-Storage-Upstream@qlogic.com \
    --cc=hch@lst.de \
    --cc=jejb@linux.vnet.ibm.com \
    --cc=jth@kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=rt@linutronix.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).