diff mbox series

thermal: amlogic: Fix build failure after conversion to .remove_new()

Message ID 20230929061305.2351953-1-u.kleine-koenig@pengutronix.de (mailing list archive)
State New, archived
Headers show
Series thermal: amlogic: Fix build failure after conversion to .remove_new() | expand

Commit Message

Uwe Kleine-König Sept. 29, 2023, 6:13 a.m. UTC
Commit 88af8b66ffed ("thermal: amlogic: Convert to platform remove
callback returning void") converted amlogic_thermal_disable() to return
no value but missed that amlogic_thermal_suspend() makes use of the int
returned by this function. As amlogic_thermal_disable() returned zero
unconditionally before, add a return 0 to get the same behaviour as
before the offending commit.

Fixes: 88af8b66ffed ("thermal: amlogic: Convert to platform remove callback returning void")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202309291214.Hjn3gJ94-lkp@intel.com/
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
Hello,

sorry for not catching that before sending. I don't understand yet what
was wrong with my testing; I would have bet the series was tested with
an ARCH=arm64 allmodconfig build. :-\

If you prefer it, feel free to squash this patch into the offending
commit.

Best regards, sorry and thanks,
Uwe

 drivers/thermal/amlogic_thermal.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Neil Armstrong Sept. 29, 2023, 9:02 a.m. UTC | #1
Le 29/09/2023 à 08:13, Uwe Kleine-König a écrit :
> Commit 88af8b66ffed ("thermal: amlogic: Convert to platform remove
> callback returning void") converted amlogic_thermal_disable() to return
> no value but missed that amlogic_thermal_suspend() makes use of the int
> returned by this function. As amlogic_thermal_disable() returned zero
> unconditionally before, add a return 0 to get the same behaviour as
> before the offending commit.
> 
> Fixes: 88af8b66ffed ("thermal: amlogic: Convert to platform remove callback returning void")
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202309291214.Hjn3gJ94-lkp@intel.com/
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
> Hello,
> 
> sorry for not catching that before sending. I don't understand yet what
> was wrong with my testing; I would have bet the series was tested with
> an ARCH=arm64 allmodconfig build. :-\
> 
> If you prefer it, feel free to squash this patch into the offending
> commit.
> 
> Best regards, sorry and thanks,
> Uwe
> 
>   drivers/thermal/amlogic_thermal.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/thermal/amlogic_thermal.c b/drivers/thermal/amlogic_thermal.c
> index 1426f1eb4ac6..562f63b7bf27 100644
> --- a/drivers/thermal/amlogic_thermal.c
> +++ b/drivers/thermal/amlogic_thermal.c
> @@ -300,7 +300,9 @@ static int __maybe_unused amlogic_thermal_suspend(struct device *dev)
>   {
>   	struct amlogic_thermal *data = dev_get_drvdata(dev);
>   
> -	return amlogic_thermal_disable(data);
> +	amlogic_thermal_disable(data);
> +
> +	return 0;
>   }
>   
>   static int __maybe_unused amlogic_thermal_resume(struct device *dev)

Acked-by: Neil Armstrong <neil.armstrong@linaro.org>
Rafael J. Wysocki Sept. 29, 2023, 11:06 a.m. UTC | #2
On Fri, Sep 29, 2023 at 8:13 AM Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:
>
> Commit 88af8b66ffed ("thermal: amlogic: Convert to platform remove
> callback returning void") converted amlogic_thermal_disable() to return
> no value but missed that amlogic_thermal_suspend() makes use of the int
> returned by this function. As amlogic_thermal_disable() returned zero
> unconditionally before, add a return 0 to get the same behaviour as
> before the offending commit.
>
> Fixes: 88af8b66ffed ("thermal: amlogic: Convert to platform remove callback returning void")
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202309291214.Hjn3gJ94-lkp@intel.com/
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
> Hello,
>
> sorry for not catching that before sending. I don't understand yet what
> was wrong with my testing; I would have bet the series was tested with
> an ARCH=arm64 allmodconfig build. :-\
>
> If you prefer it, feel free to squash this patch into the offending
> commit.

Instead, I've dropped the changes in amlogic_thermal_disable() from that commit.

IMO they are not really related to it, because "remove" is not the
only caller of the above.

Thanks!
diff mbox series

Patch

diff --git a/drivers/thermal/amlogic_thermal.c b/drivers/thermal/amlogic_thermal.c
index 1426f1eb4ac6..562f63b7bf27 100644
--- a/drivers/thermal/amlogic_thermal.c
+++ b/drivers/thermal/amlogic_thermal.c
@@ -300,7 +300,9 @@  static int __maybe_unused amlogic_thermal_suspend(struct device *dev)
 {
 	struct amlogic_thermal *data = dev_get_drvdata(dev);
 
-	return amlogic_thermal_disable(data);
+	amlogic_thermal_disable(data);
+
+	return 0;
 }
 
 static int __maybe_unused amlogic_thermal_resume(struct device *dev)