lkml.org 
[lkml]   [2021]   [Nov]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] usb: Remove redundant 'flush_workqueue()' calls
From
Date
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

\
 
 \ /
  Last update: 2021-11-12 19:00    [W:0.062 / U:0.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site