diff mbox series

tools/testing/nvdimm: remove unneeded flush_workqueue

Message ID 20220424062655.3221152-1-ran.jianping@zte.com.cn (mailing list archive)
State Accepted
Commit dbbf16895a89953ccbcf0dab2806821b1ec565ff
Headers show
Series tools/testing/nvdimm: remove unneeded flush_workqueue | expand

Commit Message

CGEL April 24, 2022, 6:26 a.m. UTC
From: ran jianping <ran.jianping@zte.com.cn>

All work currently pending will be done first by calling destroy_workqueue,
so there is no need to flush it explicitly.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: ran jianping <ran.jianping@zte.com.cn>
---
 tools/testing/nvdimm/test/nfit.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Ira Weiny April 25, 2022, 3:07 p.m. UTC | #1
On Sun, Apr 24, 2022 at 06:26:55AM +0000, cgel.zte@gmail.com wrote:
> From: ran jianping <ran.jianping@zte.com.cn>
> 
> All work currently pending will be done first by calling destroy_workqueue,
> so there is no need to flush it explicitly.
> 
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: ran jianping <ran.jianping@zte.com.cn>

Reviewed-by: Ira Weiny <ira.weiny@intel.com>

> ---
>  tools/testing/nvdimm/test/nfit.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/tools/testing/nvdimm/test/nfit.c b/tools/testing/nvdimm/test/nfit.c
> index 1da76ccde448..e7e1a640e482 100644
> --- a/tools/testing/nvdimm/test/nfit.c
> +++ b/tools/testing/nvdimm/test/nfit.c
> @@ -3375,7 +3375,6 @@ static __exit void nfit_test_exit(void)
>  {
>  	int i;
>  
> -	flush_workqueue(nfit_wq);
>  	destroy_workqueue(nfit_wq);
>  	for (i = 0; i < NUM_NFITS; i++)
>  		platform_device_unregister(&instances[i]->pdev);
> -- 
> 2.25.1
>
Dan Williams April 26, 2022, 5:01 a.m. UTC | #2
On Sat, Apr 23, 2022 at 11:27 PM <cgel.zte@gmail.com> wrote:
>
> From: ran jianping <ran.jianping@zte.com.cn>
>
> All work currently pending will be done first by calling destroy_workqueue,
> so there is no need to flush it explicitly.
>

Looks good, applied.
diff mbox series

Patch

diff --git a/tools/testing/nvdimm/test/nfit.c b/tools/testing/nvdimm/test/nfit.c
index 1da76ccde448..e7e1a640e482 100644
--- a/tools/testing/nvdimm/test/nfit.c
+++ b/tools/testing/nvdimm/test/nfit.c
@@ -3375,7 +3375,6 @@  static __exit void nfit_test_exit(void)
 {
 	int i;
 
-	flush_workqueue(nfit_wq);
 	destroy_workqueue(nfit_wq);
 	for (i = 0; i < NUM_NFITS; i++)
 		platform_device_unregister(&instances[i]->pdev);