kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ieee802154: Remove redundant 'flush_workqueue()' calls
@ 2021-10-14 18:26 Christophe JAILLET
  2021-10-16 20:54 ` Stefan Schmidt
  2021-10-19 12:30 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 5+ messages in thread
From: Christophe JAILLET @ 2021-10-14 18:26 UTC (permalink / raw)
  To: h.morris, alex.aring, stefan, davem, kuba
  Cc: linux-wpan, netdev, linux-kernel, kernel-janitors, Christophe JAILLET

'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/net/ieee802154/ca8210.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/ieee802154/ca8210.c b/drivers/net/ieee802154/ca8210.c
index 3a2824f24caa..ece6ff6049f6 100644
--- a/drivers/net/ieee802154/ca8210.c
+++ b/drivers/net/ieee802154/ca8210.c
@@ -2938,9 +2938,7 @@ static int ca8210_dev_com_init(struct ca8210_priv *priv)
  */
 static void ca8210_dev_com_clear(struct ca8210_priv *priv)
 {
-	flush_workqueue(priv->mlme_workqueue);
 	destroy_workqueue(priv->mlme_workqueue);
-	flush_workqueue(priv->irq_workqueue);
 	destroy_workqueue(priv->irq_workqueue);
 }
 
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] ieee802154: Remove redundant 'flush_workqueue()' calls
  2021-10-14 18:26 [PATCH] ieee802154: Remove redundant 'flush_workqueue()' calls Christophe JAILLET
@ 2021-10-16 20:54 ` Stefan Schmidt
  2021-10-18 21:14   ` Jakub Kicinski
  2021-10-19 12:30 ` patchwork-bot+netdevbpf
  1 sibling, 1 reply; 5+ messages in thread
From: Stefan Schmidt @ 2021-10-16 20:54 UTC (permalink / raw)
  To: Christophe JAILLET, h.morris, alex.aring, davem, kuba
  Cc: linux-wpan, netdev, linux-kernel, kernel-janitors

Hello Dave, Jakub.

I have nothing else in my ieee802154 tree for net right now so it would 
be great if you could take it directly. If that poses a problem, let me 
know and I will get it in through my tree.

On 14.10.21 20:26, 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/net/ieee802154/ca8210.c | 2 --
>   1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/net/ieee802154/ca8210.c b/drivers/net/ieee802154/ca8210.c
> index 3a2824f24caa..ece6ff6049f6 100644
> --- a/drivers/net/ieee802154/ca8210.c
> +++ b/drivers/net/ieee802154/ca8210.c
> @@ -2938,9 +2938,7 @@ static int ca8210_dev_com_init(struct ca8210_priv *priv)
>    */
>   static void ca8210_dev_com_clear(struct ca8210_priv *priv)
>   {
> -	flush_workqueue(priv->mlme_workqueue);
>   	destroy_workqueue(priv->mlme_workqueue);
> -	flush_workqueue(priv->irq_workqueue);
>   	destroy_workqueue(priv->irq_workqueue);
>   }
>   
> 

Thanks Christophe for spotting and fixing this.

Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>

regards
Stefan Schmidt

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ieee802154: Remove redundant 'flush_workqueue()' calls
  2021-10-16 20:54 ` Stefan Schmidt
@ 2021-10-18 21:14   ` Jakub Kicinski
  2021-10-19  7:18     ` Stefan Schmidt
  0 siblings, 1 reply; 5+ messages in thread
From: Jakub Kicinski @ 2021-10-18 21:14 UTC (permalink / raw)
  To: Stefan Schmidt, Christophe JAILLET
  Cc: h.morris, alex.aring, davem, linux-wpan, netdev, linux-kernel,
	kernel-janitors

On Sat, 16 Oct 2021 22:54:52 +0200 Stefan Schmidt wrote:
> I have nothing else in my ieee802154 tree for net right now so it would 
> be great if you could take it directly. 

Do you mean net or net-next? This looks like net-next material.

Just to be sure, applying directly is not a problem.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ieee802154: Remove redundant 'flush_workqueue()' calls
  2021-10-18 21:14   ` Jakub Kicinski
@ 2021-10-19  7:18     ` Stefan Schmidt
  0 siblings, 0 replies; 5+ messages in thread
From: Stefan Schmidt @ 2021-10-19  7:18 UTC (permalink / raw)
  To: Jakub Kicinski, Christophe JAILLET
  Cc: h.morris, alex.aring, davem, linux-wpan, netdev, linux-kernel,
	kernel-janitors

Hello Jakub.

On 18.10.21 23:14, Jakub Kicinski wrote:
> On Sat, 16 Oct 2021 22:54:52 +0200 Stefan Schmidt wrote:
>> I have nothing else in my ieee802154 tree for net right now so it would
>> be great if you could take it directly.
> 
> Do you mean net or net-next? This looks like net-next material.

Yes, net-next, please.

> Just to be sure, applying directly is not a problem.
> 

Thanks.

regards
Stefan Schmidt


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ieee802154: Remove redundant 'flush_workqueue()' calls
  2021-10-14 18:26 [PATCH] ieee802154: Remove redundant 'flush_workqueue()' calls Christophe JAILLET
  2021-10-16 20:54 ` Stefan Schmidt
@ 2021-10-19 12:30 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 5+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-10-19 12:30 UTC (permalink / raw)
  To: Christophe JAILLET
  Cc: h.morris, alex.aring, stefan, davem, kuba, linux-wpan, netdev,
	linux-kernel, kernel-janitors

Hello:

This patch was applied to netdev/net-next.git (master)
by David S. Miller <davem@davemloft.net>:

On Thu, 14 Oct 2021 20:26:14 +0200 you 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:
> 
> [...]

Here is the summary with links:
  - ieee802154: Remove redundant 'flush_workqueue()' calls
    https://git.kernel.org/netdev/net-next/c/07fab5a469a5

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-10-19 12:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-14 18:26 [PATCH] ieee802154: Remove redundant 'flush_workqueue()' calls Christophe JAILLET
2021-10-16 20:54 ` Stefan Schmidt
2021-10-18 21:14   ` Jakub Kicinski
2021-10-19  7:18     ` Stefan Schmidt
2021-10-19 12:30 ` patchwork-bot+netdevbpf

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