From: Daniel Wagner <wagi@monom.org>
To: linux-scsi@vger.kernel.org
Cc: "James E.J. Bottomley" <jejb@linux.vnet.ibm.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
Matthew Wilcox <matthew.r.wilcox@intel.com>,
linux-kernel@vger.kernel.org,
Daniel Wagner <daniel.wagner@bmw-carit.de>
Subject: [PATCH 2/3] sym53c8xx_2: use complete() instead complete_all()
Date: Tue, 13 Sep 2016 10:58:49 +0200 [thread overview]
Message-ID: <1473757130-14751-3-git-send-email-wagi@monom.org> (raw)
In-Reply-To: <1473757130-14751-1-git-send-email-wagi@monom.org>
From: Daniel Wagner <daniel.wagner@bmw-carit.de>
There is only one waiter for the completion, therefore there is no need
to use complete_all(). Let's make that clear by using complete() instead
of complete_all().
The usage pattern of the completion is:
waiter context waker context
sym_eh_handler()
struct completion eh_done
init_completion(eh_done)
pci_channel_offline()
wait_for_completion_timeout(eh_done)
sym2_io_resume()
complete(eh_done)
Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de>
---
drivers/scsi/sym53c8xx_2/sym_glue.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/sym53c8xx_2/sym_glue.c b/drivers/scsi/sym53c8xx_2/sym_glue.c
index 5d00e51..d32e3ba 100644
--- a/drivers/scsi/sym53c8xx_2/sym_glue.c
+++ b/drivers/scsi/sym53c8xx_2/sym_glue.c
@@ -1874,7 +1874,7 @@ static void sym2_io_resume(struct pci_dev *pdev)
spin_lock_irq(shost->host_lock);
if (sym_data->io_reset)
- complete_all(sym_data->io_reset);
+ complete(sym_data->io_reset);
spin_unlock_irq(shost->host_lock);
}
--
2.7.4
next prev parent reply other threads:[~2016-09-13 8:58 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-13 8:58 [PATCH 0/3] wireless: Use complete() instead complete_all() Daniel Wagner
2016-09-13 8:58 ` [PATCH 1/3] csiostor: fix completion usage Daniel Wagner
2016-09-14 7:26 ` Christoph Hellwig
2016-09-13 8:58 ` Daniel Wagner [this message]
2016-09-14 7:26 ` [PATCH 2/3] sym53c8xx_2: use complete() instead complete_all() Christoph Hellwig
2016-09-13 8:58 ` [PATCH 3/3] virtio_scsi: " Daniel Wagner
2016-09-14 7:27 ` Christoph Hellwig
2016-09-14 17:23 ` [PATCH 0/3] wireless: Use " Martin K. Petersen
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=1473757130-14751-3-git-send-email-wagi@monom.org \
--to=wagi@monom.org \
--cc=daniel.wagner@bmw-carit.de \
--cc=jejb@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=matthew.r.wilcox@intel.com \
/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).