All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] power: ab8500: Remove flush_scheduled_work() call.
@ 2022-06-09  4:58 Tetsuo Handa
  2022-06-09 19:43 ` Sebastian Reichel
  0 siblings, 1 reply; 5+ messages in thread
From: Tetsuo Handa @ 2022-06-09  4:58 UTC (permalink / raw)
  To: Sebastian Reichel; +Cc: linux-pm

It seems to me that ab8500 driver is using dedicated workqueues and
is not calling schedule{,_delayed}_work{,_on}(). Then, there will be
no work to flush using flush_scheduled_work().

Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
---
Please see commit c4f135d643823a86 ("workqueue: Wrap flush_workqueue()
using a macro") for background.

 drivers/power/supply/ab8500_btemp.c    | 1 -
 drivers/power/supply/ab8500_chargalg.c | 1 -
 drivers/power/supply/ab8500_charger.c  | 2 --
 drivers/power/supply/ab8500_fg.c       | 1 -
 4 files changed, 5 deletions(-)

diff --git a/drivers/power/supply/ab8500_btemp.c b/drivers/power/supply/ab8500_btemp.c
index b7e842dff567..863fabe05bdc 100644
--- a/drivers/power/supply/ab8500_btemp.c
+++ b/drivers/power/supply/ab8500_btemp.c
@@ -697,7 +697,6 @@ static void ab8500_btemp_unbind(struct device *dev, struct device *master,
 
 	/* Delete the work queue */
 	destroy_workqueue(di->btemp_wq);
-	flush_scheduled_work();
 }
 
 static const struct component_ops ab8500_btemp_component_ops = {
diff --git a/drivers/power/supply/ab8500_chargalg.c b/drivers/power/supply/ab8500_chargalg.c
index 431bbc352d1b..454acb1964fc 100644
--- a/drivers/power/supply/ab8500_chargalg.c
+++ b/drivers/power/supply/ab8500_chargalg.c
@@ -1746,7 +1746,6 @@ static void ab8500_chargalg_unbind(struct device *dev, struct device *master,
 
 	/* Delete the work queue */
 	destroy_workqueue(di->chargalg_wq);
-	flush_scheduled_work();
 }
 
 static const struct component_ops ab8500_chargalg_component_ops = {
diff --git a/drivers/power/supply/ab8500_charger.c b/drivers/power/supply/ab8500_charger.c
index d04d087caa50..0510e0ee4c60 100644
--- a/drivers/power/supply/ab8500_charger.c
+++ b/drivers/power/supply/ab8500_charger.c
@@ -3404,8 +3404,6 @@ static void ab8500_charger_unbind(struct device *dev)
 	/* Delete the work queue */
 	destroy_workqueue(di->charger_wq);
 
-	flush_scheduled_work();
-
 	/* Unbind fg, btemp, algorithm */
 	component_unbind_all(dev, di);
 }
diff --git a/drivers/power/supply/ab8500_fg.c b/drivers/power/supply/ab8500_fg.c
index ec8a404d71b4..e49f9b679b6c 100644
--- a/drivers/power/supply/ab8500_fg.c
+++ b/drivers/power/supply/ab8500_fg.c
@@ -3227,7 +3227,6 @@ static int ab8500_fg_remove(struct platform_device *pdev)
 	struct ab8500_fg *di = platform_get_drvdata(pdev);
 
 	destroy_workqueue(di->fg_wq);
-	flush_scheduled_work();
 	component_del(&pdev->dev, &ab8500_fg_component_ops);
 	list_del(&di->node);
 	ab8500_fg_sysfs_exit(di);
-- 
2.18.4


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

* Re: [PATCH] power: ab8500: Remove flush_scheduled_work() call.
  2022-06-09  4:58 [PATCH] power: ab8500: Remove flush_scheduled_work() call Tetsuo Handa
@ 2022-06-09 19:43 ` Sebastian Reichel
  2022-06-23 10:39   ` Tetsuo Handa
  2022-06-23 14:24   ` Linus Walleij
  0 siblings, 2 replies; 5+ messages in thread
From: Sebastian Reichel @ 2022-06-09 19:43 UTC (permalink / raw)
  To: Tetsuo Handa; +Cc: linux-pm, Linus Walleij

[-- Attachment #1: Type: text/plain, Size: 3284 bytes --]

Hi,

On Thu, Jun 09, 2022 at 01:58:04PM +0900, Tetsuo Handa wrote:
> It seems to me that ab8500 driver is using dedicated workqueues and
> is not calling schedule{,_delayed}_work{,_on}(). Then, there will be
> no work to flush using flush_scheduled_work().
> 
> Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
> ---
> Please see commit c4f135d643823a86 ("workqueue: Wrap flush_workqueue()
> using a macro") for background.

Looks sensible to me. Adding Linus to Cc and waiting a bit so that
he has time to review/test.

@Linus I think it makes sense to add something like this to
MAINTAINERS or add the files to the "ARM/NOMADIK/Ux500 ARCHITECTURES"
entry, so that you will be CC'd.

AB8500 BATTERY AND CHARGER DRIVERS
M:	Linus Walleij <linus.walleij@linaro.org>
S:	Maintained
F:	Documentation/devicetree/bindings/power/supply/*ab8500*
F:	Documentation/devicetree/bindings/power/supply/*ab8500*

-- Sebastian

>  drivers/power/supply/ab8500_btemp.c    | 1 -
>  drivers/power/supply/ab8500_chargalg.c | 1 -
>  drivers/power/supply/ab8500_charger.c  | 2 --
>  drivers/power/supply/ab8500_fg.c       | 1 -
>  4 files changed, 5 deletions(-)
> 
> diff --git a/drivers/power/supply/ab8500_btemp.c b/drivers/power/supply/ab8500_btemp.c
> index b7e842dff567..863fabe05bdc 100644
> --- a/drivers/power/supply/ab8500_btemp.c
> +++ b/drivers/power/supply/ab8500_btemp.c
> @@ -697,7 +697,6 @@ static void ab8500_btemp_unbind(struct device *dev, struct device *master,
>  
>  	/* Delete the work queue */
>  	destroy_workqueue(di->btemp_wq);
> -	flush_scheduled_work();
>  }
>  
>  static const struct component_ops ab8500_btemp_component_ops = {
> diff --git a/drivers/power/supply/ab8500_chargalg.c b/drivers/power/supply/ab8500_chargalg.c
> index 431bbc352d1b..454acb1964fc 100644
> --- a/drivers/power/supply/ab8500_chargalg.c
> +++ b/drivers/power/supply/ab8500_chargalg.c
> @@ -1746,7 +1746,6 @@ static void ab8500_chargalg_unbind(struct device *dev, struct device *master,
>  
>  	/* Delete the work queue */
>  	destroy_workqueue(di->chargalg_wq);
> -	flush_scheduled_work();
>  }
>  
>  static const struct component_ops ab8500_chargalg_component_ops = {
> diff --git a/drivers/power/supply/ab8500_charger.c b/drivers/power/supply/ab8500_charger.c
> index d04d087caa50..0510e0ee4c60 100644
> --- a/drivers/power/supply/ab8500_charger.c
> +++ b/drivers/power/supply/ab8500_charger.c
> @@ -3404,8 +3404,6 @@ static void ab8500_charger_unbind(struct device *dev)
>  	/* Delete the work queue */
>  	destroy_workqueue(di->charger_wq);
>  
> -	flush_scheduled_work();
> -
>  	/* Unbind fg, btemp, algorithm */
>  	component_unbind_all(dev, di);
>  }
> diff --git a/drivers/power/supply/ab8500_fg.c b/drivers/power/supply/ab8500_fg.c
> index ec8a404d71b4..e49f9b679b6c 100644
> --- a/drivers/power/supply/ab8500_fg.c
> +++ b/drivers/power/supply/ab8500_fg.c
> @@ -3227,7 +3227,6 @@ static int ab8500_fg_remove(struct platform_device *pdev)
>  	struct ab8500_fg *di = platform_get_drvdata(pdev);
>  
>  	destroy_workqueue(di->fg_wq);
> -	flush_scheduled_work();
>  	component_del(&pdev->dev, &ab8500_fg_component_ops);
>  	list_del(&di->node);
>  	ab8500_fg_sysfs_exit(di);
> -- 
> 2.18.4
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH] power: ab8500: Remove flush_scheduled_work() call.
  2022-06-09 19:43 ` Sebastian Reichel
@ 2022-06-23 10:39   ` Tetsuo Handa
  2022-06-23 14:24   ` Linus Walleij
  1 sibling, 0 replies; 5+ messages in thread
From: Tetsuo Handa @ 2022-06-23 10:39 UTC (permalink / raw)
  To: Linus Walleij; +Cc: linux-pm, Sebastian Reichel

Linus, is this patch OK?

On 2022/06/10 4:43, Sebastian Reichel wrote:
> Hi,
> 
> On Thu, Jun 09, 2022 at 01:58:04PM +0900, Tetsuo Handa wrote:
>> It seems to me that ab8500 driver is using dedicated workqueues and
>> is not calling schedule{,_delayed}_work{,_on}(). Then, there will be
>> no work to flush using flush_scheduled_work().
>>
>> Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
>> ---
>> Please see commit c4f135d643823a86 ("workqueue: Wrap flush_workqueue()
>> using a macro") for background.
> 
> Looks sensible to me. Adding Linus to Cc and waiting a bit so that
> he has time to review/test.
> 
> @Linus I think it makes sense to add something like this to
> MAINTAINERS or add the files to the "ARM/NOMADIK/Ux500 ARCHITECTURES"
> entry, so that you will be CC'd.
> 
> AB8500 BATTERY AND CHARGER DRIVERS
> M:	Linus Walleij <linus.walleij@linaro.org>
> S:	Maintained
> F:	Documentation/devicetree/bindings/power/supply/*ab8500*
> F:	Documentation/devicetree/bindings/power/supply/*ab8500*
> 
> -- Sebastian
> 
>>  drivers/power/supply/ab8500_btemp.c    | 1 -
>>  drivers/power/supply/ab8500_chargalg.c | 1 -
>>  drivers/power/supply/ab8500_charger.c  | 2 --
>>  drivers/power/supply/ab8500_fg.c       | 1 -
>>  4 files changed, 5 deletions(-)
>>

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

* Re: [PATCH] power: ab8500: Remove flush_scheduled_work() call.
  2022-06-09 19:43 ` Sebastian Reichel
  2022-06-23 10:39   ` Tetsuo Handa
@ 2022-06-23 14:24   ` Linus Walleij
  2022-07-16 23:08     ` Sebastian Reichel
  1 sibling, 1 reply; 5+ messages in thread
From: Linus Walleij @ 2022-06-23 14:24 UTC (permalink / raw)
  To: Sebastian Reichel; +Cc: Tetsuo Handa, linux-pm

On Thu, Jun 9, 2022 at 9:43 PM Sebastian Reichel
<sebastian.reichel@collabora.com> wrote:
> On Thu, Jun 09, 2022 at 01:58:04PM +0900, Tetsuo Handa wrote:
> > It seems to me that ab8500 driver is using dedicated workqueues and
> > is not calling schedule{,_delayed}_work{,_on}(). Then, there will be
> > no work to flush using flush_scheduled_work().
> >
> > Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
> > ---
> > Please see commit c4f135d643823a86 ("workqueue: Wrap flush_workqueue()
> > using a macro") for background.
>
> Looks sensible to me. Adding Linus to Cc and waiting a bit so that
> he has time to review/test.

Makes perfect sense.
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

> @Linus I think it makes sense to add something like this to
> MAINTAINERS or add the files to the "ARM/NOMADIK/Ux500 ARCHITECTURES"
> entry, so that you will be CC'd.
>
> AB8500 BATTERY AND CHARGER DRIVERS
> M:      Linus Walleij <linus.walleij@linaro.org>
> S:      Maintained
> F:      Documentation/devicetree/bindings/power/supply/*ab8500*
> F:      Documentation/devicetree/bindings/power/supply/*ab8500*

OK I fix something.

Yours,
Linus Walleij

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

* Re: [PATCH] power: ab8500: Remove flush_scheduled_work() call.
  2022-06-23 14:24   ` Linus Walleij
@ 2022-07-16 23:08     ` Sebastian Reichel
  0 siblings, 0 replies; 5+ messages in thread
From: Sebastian Reichel @ 2022-07-16 23:08 UTC (permalink / raw)
  To: Linus Walleij; +Cc: Tetsuo Handa, linux-pm

[-- Attachment #1: Type: text/plain, Size: 1355 bytes --]

Hi,

On Thu, Jun 23, 2022 at 04:24:09PM +0200, Linus Walleij wrote:
> On Thu, Jun 9, 2022 at 9:43 PM Sebastian Reichel
> <sebastian.reichel@collabora.com> wrote:
> > On Thu, Jun 09, 2022 at 01:58:04PM +0900, Tetsuo Handa wrote:
> > > It seems to me that ab8500 driver is using dedicated workqueues and
> > > is not calling schedule{,_delayed}_work{,_on}(). Then, there will be
> > > no work to flush using flush_scheduled_work().
> > >
> > > Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
> > > ---
> > > Please see commit c4f135d643823a86 ("workqueue: Wrap flush_workqueue()
> > > using a macro") for background.
> >
> > Looks sensible to me. Adding Linus to Cc and waiting a bit so that
> > he has time to review/test.
> 
> Makes perfect sense.
> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Thanks, queued.

> > @Linus I think it makes sense to add something like this to
> > MAINTAINERS or add the files to the "ARM/NOMADIK/Ux500 ARCHITECTURES"
> > entry, so that you will be CC'd.
> >
> > AB8500 BATTERY AND CHARGER DRIVERS
> > M:      Linus Walleij <linus.walleij@linaro.org>
> > S:      Maintained
> > F:      Documentation/devicetree/bindings/power/supply/*ab8500*
> > F:      Documentation/devicetree/bindings/power/supply/*ab8500*
> 
> OK I fix something.

Thanks.

-- Sebastian

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

end of thread, other threads:[~2022-07-16 23:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-09  4:58 [PATCH] power: ab8500: Remove flush_scheduled_work() call Tetsuo Handa
2022-06-09 19:43 ` Sebastian Reichel
2022-06-23 10:39   ` Tetsuo Handa
2022-06-23 14:24   ` Linus Walleij
2022-07-16 23:08     ` Sebastian Reichel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.