Linux Power Management development
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: kernel test robot <lkp@intel.com>,
	oe-kbuild-all@lists.linux.dev, linux-acpi@vger.kernel.org,
	devel@acpica.org, linux-pm@vger.kernel.org,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>
Subject: Re: [rafael-pm:bleeding-edge 48/94] drivers/thermal/amlogic_thermal.c:303:16: error: void value not ignored as it ought to be
Date: Fri, 29 Sep 2023 15:47:57 +0200	[thread overview]
Message-ID: <20230929134757.5ztol37eqttvr4wo@pengutronix.de> (raw)
In-Reply-To: <CAJZ5v0gGissufTrvCa+z5i=kPMDM+-RKoQfOHW41zf7o2=z4SQ@mail.gmail.com>

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

On Fri, Sep 29, 2023 at 12:37:03PM +0200, Rafael J. Wysocki wrote:
> On Fri, Sep 29, 2023 at 6:21 AM kernel test robot <lkp@intel.com> wrote:
> >
> > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git bleeding-edge
> > head:   2cff74feed4a2a3a1c220e0ee2838b85b08d4999
> > commit: 88af8b66ffedcad8c5a1522f6a9c02bf8129a951 [48/94] thermal: amlogic: Convert to platform remove callback returning void
> > config: arm-randconfig-004-20230929 (https://download.01.org/0day-ci/archive/20230929/202309291214.Hjn3gJ94-lkp@intel.com/config)
> > compiler: arm-linux-gnueabi-gcc (GCC) 13.2.0
> > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230929/202309291214.Hjn3gJ94-lkp@intel.com/reproduce)
> >
> > If you fix the issue in a separate patch/commit (i.e. not just a new version of
> > the same patch/commit), kindly add following tags
> > | Reported-by: kernel test robot <lkp@intel.com>
> > | Closes: https://lore.kernel.org/oe-kbuild-all/202309291214.Hjn3gJ94-lkp@intel.com/
> >
> > All errors (new ones prefixed by >>):
> >
> >    drivers/thermal/amlogic_thermal.c: In function 'amlogic_thermal_suspend':
> > >> drivers/thermal/amlogic_thermal.c:303:16: error: void value not ignored as it ought to be
> >      303 |         return amlogic_thermal_disable(data);
> >          |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> amlogic_thermal_disable() should not be modified by this commit -
> fixed up in the tree.

Thanks for choosing an option that hides that embarrassing build
failure. :-)

IMHO

https://lore.kernel.org/all/20230929061305.2351953-1-u.kleine-koenig@pengutronix.de

is the nicer fix because with that amlogic_thermal_remove() would ignore
the return value of amlogic_thermal_disable(). On top of your current
tree that would be:

diff --git a/drivers/thermal/amlogic_thermal.c b/drivers/thermal/amlogic_thermal.c
index 5877cde25b79..562f63b7bf27 100644
--- a/drivers/thermal/amlogic_thermal.c
+++ b/drivers/thermal/amlogic_thermal.c
@@ -167,13 +167,11 @@ static int amlogic_thermal_enable(struct amlogic_thermal *data)
 	return 0;
 }
 
-static int amlogic_thermal_disable(struct amlogic_thermal *data)
+static void amlogic_thermal_disable(struct amlogic_thermal *data)
 {
 	regmap_update_bits(data->regmap, TSENSOR_CFG_REG1,
 			   TSENSOR_CFG_REG1_ENABLE, 0);
 	clk_disable_unprepare(data->clk);
-
-	return 0;
 }
 
 static int amlogic_thermal_get_temp(struct thermal_zone_device *tz, int *temp)
@@ -302,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)

But I won't argue further and consider the case closed.

Thanks
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

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

      reply	other threads:[~2023-09-29 13:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-29  4:21 [rafael-pm:bleeding-edge 48/94] drivers/thermal/amlogic_thermal.c:303:16: error: void value not ignored as it ought to be kernel test robot
2023-09-29 10:37 ` Rafael J. Wysocki
2023-09-29 13:47   ` Uwe Kleine-König [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230929134757.5ztol37eqttvr4wo@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=devel@acpica.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=rafael@kernel.org \
    --cc=rjw@rjwysocki.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox