linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] qedi: Remove redundant 'flush_workqueue()' calls
@ 2022-01-27  1:39 cgel.zte
  2022-02-07  4:47 ` [EXT] " Manish Rangankar
  2022-02-08  4:52 ` Martin K. Petersen
  0 siblings, 2 replies; 3+ messages in thread
From: cgel.zte @ 2022-01-27  1:39 UTC (permalink / raw)
  To: njavali
  Cc: mrangankar, GR-QLogic-Storage-Upstream, jejb, martin.petersen,
	linux-scsi, linux-kernel, Minghao Chi (CGEL ZTE),
	Zeal Robot, CGEL ZTE

From: "Minghao Chi (CGEL ZTE)" <chi.minghao@zte.com.cn>

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

Remove the redundant 'flush_workqueue()' calls.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi (CGEL ZTE) <chi.minghao@zte.com.cn>
Signed-off-by: CGEL ZTE <cgel.zte@gmail.com>
---
 drivers/scsi/qedi/qedi_main.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/scsi/qedi/qedi_main.c b/drivers/scsi/qedi/qedi_main.c
index 832a856dd367..83ffba7f51da 100644
--- a/drivers/scsi/qedi/qedi_main.c
+++ b/drivers/scsi/qedi/qedi_main.c
@@ -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;
 		}
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* RE: [EXT] [PATCH] qedi: Remove redundant 'flush_workqueue()' calls
  2022-01-27  1:39 [PATCH] qedi: Remove redundant 'flush_workqueue()' calls cgel.zte
@ 2022-02-07  4:47 ` Manish Rangankar
  2022-02-08  4:52 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Manish Rangankar @ 2022-02-07  4:47 UTC (permalink / raw)
  To: cgel.zte
  Cc: GR-QLogic-Storage-Upstream, jejb, martin.petersen, linux-scsi,
	linux-kernel, Minghao Chi (CGEL ZTE),
	Zeal Robot


> -----Original Message-----
> From: cgel.zte@gmail.com <cgel.zte@gmail.com>
> Sent: Thursday, January 27, 2022 7:10 AM
> To: Nilesh Javali <njavali@marvell.com>
> Cc: Manish Rangankar <mrangankar@marvell.com>; GR-QLogic-Storage-
> Upstream <GR-QLogic-Storage-Upstream@marvell.com>; jejb@linux.ibm.com;
> martin.petersen@oracle.com; linux-scsi@vger.kernel.org; linux-
> kernel@vger.kernel.org; Minghao Chi (CGEL ZTE) <chi.minghao@zte.com.cn>;
> Zeal Robot <zealci@zte.com.cn>; CGEL ZTE <cgel.zte@gmail.com>
> Subject: [EXT] [PATCH] qedi: Remove redundant 'flush_workqueue()' calls
> 
> External Email
> 
> ----------------------------------------------------------------------
> From: "Minghao Chi (CGEL ZTE)" <chi.minghao@zte.com.cn>
> 
> 'destroy_workqueue()' already drains the queue before destroying it, so there is
> no need to flush it explicitly.
> 
> Remove the redundant 'flush_workqueue()' calls.
> 
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: Minghao Chi (CGEL ZTE) <chi.minghao@zte.com.cn>
> Signed-off-by: CGEL ZTE <cgel.zte@gmail.com>
> ---
>  drivers/scsi/qedi/qedi_main.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/scsi/qedi/qedi_main.c b/drivers/scsi/qedi/qedi_main.c index
> 832a856dd367..83ffba7f51da 100644
> --- a/drivers/scsi/qedi/qedi_main.c
> +++ b/drivers/scsi/qedi/qedi_main.c
> @@ -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;
>  		}

Thanks,

Acked-by: Manish Rangankar <mrangankar@marvell.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] qedi: Remove redundant 'flush_workqueue()' calls
  2022-01-27  1:39 [PATCH] qedi: Remove redundant 'flush_workqueue()' calls cgel.zte
  2022-02-07  4:47 ` [EXT] " Manish Rangankar
@ 2022-02-08  4:52 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2022-02-08  4:52 UTC (permalink / raw)
  To: njavali, cgel.zte
  Cc: Martin K . Petersen, jejb, Zeal Robot, linux-scsi,
	GR-QLogic-Storage-Upstream, mrangankar, Minghao Chi (CGEL ZTE),
	linux-kernel

On Thu, 27 Jan 2022 01:39:34 +0000, cgel.zte@gmail.com wrote:

> From: "Minghao Chi (CGEL ZTE)" <chi.minghao@zte.com.cn>
> 
> '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

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-02-08  5:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-27  1:39 [PATCH] qedi: Remove redundant 'flush_workqueue()' calls cgel.zte
2022-02-07  4:47 ` [EXT] " Manish Rangankar
2022-02-08  4:52 ` Martin K. Petersen

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).