From: Gilad Ben-Yossef <gilad@benyossef.com>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: Herbert Xu <herbert@gondor.apana.org.au>,
David Miller <davem@davemloft.net>,
Linux Crypto Mailing List <linux-crypto@vger.kernel.org>,
Linux kernel mailing list <linux-kernel@vger.kernel.org>,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] crypto: ccree - remove redundant 'flush_workqueue()' calls
Date: Tue, 16 Nov 2021 09:42:11 +0200 [thread overview]
Message-ID: <CAOtvUMcQONyqJ=MaprVLyDyc_z+5_HwCdjgaNVcOLMFV6i3FPA@mail.gmail.com> (raw)
In-Reply-To: <2a313cc6de53c492db10e29c6444d8e6f2529689.1636735696.git.christophe.jaillet@wanadoo.fr>
On Fri, Nov 12, 2021 at 6:49 PM Christophe JAILLET
<christophe.jaillet@wanadoo.fr> wrote:
>
> 'destroy_workqueue()' already drains the queue before destroying it, so
> there is no need to flush it explicitly.
>
> Remove the redundant 'flush_workqueue()' calls.
>
> This was generated with coccinelle:
>
> @@
> expression E;
> @@
> - flush_workqueue(E);
> destroy_workqueue(E);
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
> drivers/crypto/ccree/cc_request_mgr.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/crypto/ccree/cc_request_mgr.c b/drivers/crypto/ccree/cc_request_mgr.c
> index 33fb27745d52..887162df50f9 100644
> --- a/drivers/crypto/ccree/cc_request_mgr.c
> +++ b/drivers/crypto/ccree/cc_request_mgr.c
> @@ -101,7 +101,6 @@ void cc_req_mgr_fini(struct cc_drvdata *drvdata)
> dev_dbg(dev, "max_used_sw_slots=%d\n", req_mgr_h->max_used_sw_slots);
>
> #ifdef COMP_IN_WQ
> - flush_workqueue(req_mgr_h->workq);
> destroy_workqueue(req_mgr_h->workq);
> #else
> /* Kill tasklet */
> --
> 2.30.2
>
Acked-by: Gilad Ben-Yossef <gilad@benyossef.com>
Thank you for finding ths.
Also, this triggers me to revisit why the workqueue code is there at
all. I think we don't actually use it, so double thanks.
Gilad
--
Gilad Ben-Yossef
Chief Coffee Drinker
values of β will give rise to dom!
next prev parent reply other threads:[~2021-11-16 7:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-12 16:49 [PATCH] crypto: ccree - remove redundant 'flush_workqueue()' calls Christophe JAILLET
2021-11-12 18:18 ` Cristian Marussi
2021-11-16 7:42 ` Gilad Ben-Yossef [this message]
2021-11-20 4:32 ` Herbert Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAOtvUMcQONyqJ=MaprVLyDyc_z+5_HwCdjgaNVcOLMFV6i3FPA@mail.gmail.com' \
--to=gilad@benyossef.com \
--cc=christophe.jaillet@wanadoo.fr \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).