2022-04-25 03:41:09

by CGEL

[permalink] [raw]
Subject: [PATCH] tools/testing/nvdimm: remove unneeded flush_workqueue

From: ran jianping <[email protected]>

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 <[email protected]>
Signed-off-by: ran jianping <[email protected]>
---
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


2022-04-26 00:01:43

by Ira Weiny

[permalink] [raw]
Subject: Re: [PATCH] tools/testing/nvdimm: remove unneeded flush_workqueue

On Sun, Apr 24, 2022 at 06:26:55AM +0000, [email protected] wrote:
> From: ran jianping <[email protected]>
>
> 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 <[email protected]>
> Signed-off-by: ran jianping <[email protected]>

Reviewed-by: Ira Weiny <[email protected]>

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

2022-04-26 12:41:20

by Dan Williams

[permalink] [raw]
Subject: Re: [PATCH] tools/testing/nvdimm: remove unneeded flush_workqueue

On Sat, Apr 23, 2022 at 11:27 PM <[email protected]> wrote:
>
> From: ran jianping <[email protected]>
>
> All work currently pending will be done first by calling destroy_workqueue,
> so there is no need to flush it explicitly.
>

Looks good, applied.