mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] power: supply: mt6370: Remove redundant 'flush_workqueue()' calls
@ 2025-03-12  7:37 Chen Ni
  2025-03-17 15:21 ` Sebastian Reichel
  0 siblings, 1 reply; 2+ messages in thread
From: Chen Ni @ 2025-03-12  7:37 UTC (permalink / raw)
  To: sre, matthias.bgg, angelogioacchino.delregno, linux-pm,
	linux-kernel, linux-arm-kernel, linux-mediatek
  Cc: Chen Ni

'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: Chen Ni <nichen@iscas.ac.cn>
---
 drivers/power/supply/mt6370-charger.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/power/supply/mt6370-charger.c b/drivers/power/supply/mt6370-charger.c
index a6939c6059c7..98579998b300 100644
--- a/drivers/power/supply/mt6370-charger.c
+++ b/drivers/power/supply/mt6370-charger.c
@@ -772,7 +772,6 @@ static void mt6370_chg_destroy_wq(void *data)
 {
 	struct workqueue_struct *wq = data;
 
-	flush_workqueue(wq);
 	destroy_workqueue(wq);
 }
 
-- 
2.25.1


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

* Re: [PATCH] power: supply: mt6370: Remove redundant 'flush_workqueue()' calls
  2025-03-12  7:37 [PATCH] power: supply: mt6370: Remove redundant 'flush_workqueue()' calls Chen Ni
@ 2025-03-17 15:21 ` Sebastian Reichel
  0 siblings, 0 replies; 2+ messages in thread
From: Sebastian Reichel @ 2025-03-17 15:21 UTC (permalink / raw)
  To: sre, matthias.bgg, angelogioacchino.delregno, linux-pm,
	linux-kernel, linux-arm-kernel, linux-mediatek, Chen Ni


On Wed, 12 Mar 2025 15:37:29 +0800, Chen Ni 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:
> 
> [...]

Applied, thanks!

[1/1] power: supply: mt6370: Remove redundant 'flush_workqueue()' calls
      commit: 0b8d073f6c66d7110ac9fab1f13a09337e03f1b6

Best regards,
-- 
Sebastian Reichel <sebastian.reichel@collabora.com>


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

end of thread, other threads:[~2025-03-17 15:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-03-12  7:37 [PATCH] power: supply: mt6370: Remove redundant 'flush_workqueue()' calls Chen Ni
2025-03-17 15:21 ` Sebastian Reichel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®