Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1482281
| From | Daniel Wagner <wagi@monom.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 2/3] sym53c8xx_2: use complete() instead complete_all() |
| Date | 2016-09-13 11:00 +0200 |
| Message-ID | <sgRJp-7Xu-47@gated-at.bofh.it> (permalink) |
| References | <sgRJo-7Xu-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/3] wireless: Use complete() instead complete_all() Daniel Wagner <wagi@monom.org> - 2016-09-13 11:00 +0200
[PATCH 1/3] csiostor: fix completion usage Daniel Wagner <wagi@monom.org> - 2016-09-13 11:00 +0200
Re: [PATCH 1/3] csiostor: fix completion usage Christoph Hellwig <hch@infradead.org> - 2016-09-14 09:30 +0200
[PATCH 2/3] sym53c8xx_2: use complete() instead complete_all() Daniel Wagner <wagi@monom.org> - 2016-09-13 11:00 +0200
[PATCH 3/3] virtio_scsi: use complete() instead complete_all() Daniel Wagner <wagi@monom.org> - 2016-09-13 11:00 +0200
Re: [PATCH 3/3] virtio_scsi: use complete() instead complete_all() Christoph Hellwig <hch@infradead.org> - 2016-09-14 09:30 +0200
Re: [PATCH 0/3] wireless: Use complete() instead complete_all() "Martin K. Petersen" <martin.petersen@oracle.com> - 2016-09-14 19:30 +0200
csiph-web