Skip to contentSkip to conversation

qedi: Remove redundant 'flush_workqueue()' calls

PATCH Applied [email protected] 3 participants 3 messages Jan 27, 2022 – Feb 8, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 qedi: Remove redundant 'flush_workqueue()' calls

From: "Minghao Chi (CGEL ZTE)" <[email protected]>

'destroy_workqueue()' already drains the queue before destroying it, so there is no need to flush it explicitly.

Remove the redundant 'flush_workqueue()' calls.

---
 drivers/scsi/qedi/qedi_main.c | 2 --
 1 file changed, 2 deletions(-)
drivers/scsi/qedi/qedi_main.c +0 -2
index 832a856dd367..83ffba7f51da 100644
@@ -2418,13 +2418,11 @@ static void __qedi_remove(struct pci_dev *pdev, int mode)
 		iscsi_host_remove(qedi->shost);
 
 		if (qedi->tmf_thread) {
-			flush_workqueue(qedi->tmf_thread);
 			destroy_workqueue(qedi->tmf_thread);
 			qedi->tmf_thread = NULL;
 		}
 
 		if (qedi->offload_thread) {
-			flush_workqueue(qedi->offload_thread);
 			destroy_workqueue(qedi->offload_thread);
 			qedi->offload_thread = NULL;
 		}
Signature · 1 line
2.25.1
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 47 lines

-----Original Message-----
From: [email protected] <[email protected]>
Sent: Thursday, January 27, 2022 7:10 AM
To: Nilesh Javali <[email protected]>
Cc: Manish Rangankar <[email protected]>; GR-QLogic-Storage- Upstream <[email protected]>; [email protected]; [email protected]; [email protected]; linux- [email protected]; Minghao Chi (CGEL ZTE) <[email protected]>; Zeal Robot <[email protected]>; CGEL ZTE <[email protected]>
Subject: [EXT] [PATCH] qedi: Remove redundant 'flush_workqueue()' calls

External Email

----------------------------------------------------------------------
From: "Minghao Chi (CGEL ZTE)" <[email protected]>

'destroy_workqueue()' already drains the queue before destroying it, so there is no need to flush it explicitly.

Remove the redundant 'flush_workqueue()' calls.

---
 drivers/scsi/qedi/qedi_main.c | 2 --
 1 file changed, 2 deletions(-)
drivers/scsi/qedi/qedi_main.c index renamed from drivers/scsi/qedi/qedi_main.c +0 -0

832a856dd367..83ffba7f51da 100644

drivers/scsi/qedi/qedi_main.c +0 -2
@@ -2418,13 +2418,11 @@ static void __qedi_remove(struct pci_dev *pdev,
 int mode)
 		iscsi_host_remove(qedi->shost);
 
 		if (qedi->tmf_thread) {
-			flush_workqueue(qedi->tmf_thread);
 			destroy_workqueue(qedi->tmf_thread);
 			qedi->tmf_thread = NULL;
 		}
 
 		if (qedi->offload_thread) {
-			flush_workqueue(qedi->offload_thread);
 			destroy_workqueue(qedi->offload_thread);
 			qedi->offload_thread = NULL;
Quoted 1 line

}

Thanks,

#2 lore raw
In reply to [email protected]
Quoted 8 lines · On Thu, 27 Jan 2022 01:39:34 +0000, [email protected] wrote:

From: "Minghao Chi (CGEL ZTE)" <[email protected]>

'destroy_workqueue()' already drains the queue before destroying it, so there is no need to flush it explicitly.

Remove the redundant 'flush_workqueue()' calls.

[...]

Applied to 5.18/scsi-queue, thanks!

[1/1] qedi: Remove redundant 'flush_workqueue()' calls

      https://git.kernel.org/mkp/scsi/c/0603be719237
Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering