From: Shuah Khan <skhan@linuxfoundation.org>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
peter.chen@kernel.org, gregkh@linuxfoundation.org,
balbi@kernel.org, valentina.manea.m@gmail.com, shuah@kernel.org,
johan@kernel.org, zhengyongjun3@huawei.com, colin.king@intel.com,
trix@redhat.com, Shuah Khan <skhan@linuxfoundation.org>
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] usb: Remove redundant 'flush_workqueue()' calls
Date: Fri, 12 Nov 2021 10:59:51 -0700 [thread overview]
Message-ID: <7b37c4b8-1bfa-2367-a6ad-6b40f5523934@linuxfoundation.org> (raw)
In-Reply-To: <563123a8117d6cafae3f134e497587bd2b8bb7f4.1636734453.git.christophe.jaillet@wanadoo.fr>
On 11/12/21 9:30 AM, Christophe JAILLET 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/usb/chipidea/otg.c | 5 ++---
> drivers/usb/gadget/udc/mv_udc_core.c | 4 +---
> drivers/usb/host/u132-hcd.c | 1 -
> drivers/usb/phy/phy-mv-usb.c | 5 +----
> drivers/usb/usbip/usbip_event.c | 1 -
> 5 files changed, 4 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/usb/usbip/usbip_event.c b/drivers/usb/usbip/usbip_event.c
> index 086ca76dd053..26513540bcdb 100644
> --- a/drivers/usb/usbip/usbip_event.c
> +++ b/drivers/usb/usbip/usbip_event.c
> @@ -137,7 +137,6 @@ int usbip_init_eh(void)
>
> void usbip_finish_eh(void)
> {
> - flush_workqueue(usbip_queue);
> destroy_workqueue(usbip_queue);
> usbip_queue = NULL;
> }
>
Might be better to generate per driver patches.
Looks good to me. For the usbip change in this patch:
Acked-by: Shuah Khan <skhan@linuxfoundation.org>
thanks,
-- Shuah
next prev parent reply other threads:[~2021-11-12 18:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-12 16:30 [PATCH] usb: Remove redundant 'flush_workqueue()' calls Christophe JAILLET
2021-11-12 17:59 ` Shuah Khan [this message]
2021-11-13 12:25 ` Peter Chen
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=7b37c4b8-1bfa-2367-a6ad-6b40f5523934@linuxfoundation.org \
--to=skhan@linuxfoundation.org \
--cc=balbi@kernel.org \
--cc=christophe.jaillet@wanadoo.fr \
--cc=colin.king@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=johan@kernel.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=peter.chen@kernel.org \
--cc=shuah@kernel.org \
--cc=trix@redhat.com \
--cc=valentina.manea.m@gmail.com \
--cc=zhengyongjun3@huawei.com \
/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).