Linux Power Management development
 help / color / mirror / Atom feed
From: "thermal-bot for Bryan Brattlof" <tip-bot2@linutronix.de>
To: linux-pm@vger.kernel.org
Cc: Bryan Brattlof <bb@ti.com>,
	Daniel Lezcano <daniel.lezcano@kernel.org>,
	rui.zhang@intel.com, daniel.lezcano@linaro.org, amitk@kernel.org
Subject: [thermal: thermal/next] thermal/drivers/k3_j72xx_bandgap: Simplify k3_thermal_get_temp() function
Date: Fri, 09 Dec 2022 15:26:27 -0000	[thread overview]
Message-ID: <167059958735.4906.597495666808063069.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20221031232702.10339-2-bb@ti.com>

The following commit has been merged into the thermal/next branch of thermal:

Commit-ID:     277958b1c90fc5818fc9dea870cc5aec9af3d152
Gitweb:        https://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux.git//277958b1c90fc5818fc9dea870cc5aec9af3d152
Author:        Bryan Brattlof <bb@ti.com>
AuthorDate:    Mon, 31 Oct 2022 18:26:52 -05:00
Committer:     Daniel Lezcano <daniel.lezcano@kernel.org>
CommitterDate: Thu, 08 Dec 2022 14:30:44 +01:00

thermal/drivers/k3_j72xx_bandgap: Simplify k3_thermal_get_temp() function

The k3_thermal_get_temp() function can be simplified to return only
the result of k3_bgp_read_temp() without needing the 'ret' variable

Signed-off-by: Bryan Brattlof <bb@ti.com>
Link: https://lore.kernel.org/r/20221031232702.10339-2-bb@ti.com
Signed-off-by: Daniel Lezcano <daniel.lezcano@kernel.org>
---
 drivers/thermal/k3_j72xx_bandgap.c |  9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/drivers/thermal/k3_j72xx_bandgap.c b/drivers/thermal/k3_j72xx_bandgap.c
index c073b10..a9f99a1 100644
--- a/drivers/thermal/k3_j72xx_bandgap.c
+++ b/drivers/thermal/k3_j72xx_bandgap.c
@@ -249,14 +249,7 @@ static inline int k3_bgp_read_temp(struct k3_thermal_data *devdata,
 /* Get temperature callback function for thermal zone */
 static int k3_thermal_get_temp(struct thermal_zone_device *tz, int *temp)
 {
-	struct k3_thermal_data *data = tz->devdata;
-	int ret = 0;
-
-	ret = k3_bgp_read_temp(data, temp);
-	if (ret)
-		return ret;
-
-	return ret;
+	return k3_bgp_read_temp(tz->devdata, temp);
 }
 
 static const struct thermal_zone_device_ops k3_of_thermal_ops = {

  reply	other threads:[~2022-12-09 15:26 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-31 23:26 [PATCH v3 00/11] enable VTM node for all TI's K3 SoCs Bryan Brattlof
2022-10-31 23:26 ` [PATCH v3 01/11] thermal: k3_j72xx_bandgap: simplify k3_thermal_get_temp() function Bryan Brattlof
2022-12-09 15:26   ` thermal-bot for Bryan Brattlof [this message]
2022-10-31 23:26 ` [PATCH v3 02/11] thermal: k3_j72xx_bandgap: use bool for i2128 erratum flag Bryan Brattlof
2022-12-09 15:26   ` [thermal: thermal/next] thermal/drivers/k3_j72xx_bandgap: Use " thermal-bot for Bryan Brattlof
2022-10-31 23:26 ` [PATCH v3 03/11] thermal: k3_j72xx_bandgap: remove fuse_base from structure Bryan Brattlof
2022-12-09 15:26   ` [thermal: thermal/next] thermal/drivers/k3_j72xx_bandgap: Remove " thermal-bot for Bryan Brattlof
2022-10-31 23:26 ` [PATCH v3 04/11] thermal: k3_j72xx_bandgap: map fuse_base only for erratum workaround Bryan Brattlof
2022-12-09 15:26   ` [thermal: thermal/next] thermal/drivers/k3_j72xx_bandgap: Map " thermal-bot for Bryan Brattlof
2022-10-31 23:26 ` [PATCH v3 05/11] dt-bindings: thermal: k3-j72xx: elaborate on binding description Bryan Brattlof
2022-12-09 15:26   ` [thermal: thermal/next] " thermal-bot for Bryan Brattlof
2022-10-31 23:26 ` [PATCH v3 06/11] dt-bindings: thermal: k3-j72xx: conditionally require efuse reg range Bryan Brattlof
2022-12-09 15:26   ` [thermal: thermal/next] " thermal-bot for Bryan Brattlof
2022-10-31 23:26 ` [PATCH v3 07/11] arm64: dts: ti: k3-am64-main: add VTM node Bryan Brattlof
2022-10-31 23:26 ` [PATCH v3 08/11] arm64: dts: ti: k3-am62-wakeup: " Bryan Brattlof
2022-10-31 23:27 ` [PATCH v3 09/11] arm64: dts: ti: k3-j721e-mcu-wakeup: " Bryan Brattlof
2022-10-31 23:27 ` [PATCH v3 10/11] arm64: dts: ti: k3-j721s2-mcu-wakeup: " Bryan Brattlof
2022-10-31 23:27 ` [PATCH v3 11/11] arm64: dts: ti: k3-j7200-mcu-wakeup: " Bryan Brattlof
2022-12-06 17:02 ` [PATCH v3 00/11] enable VTM node for all TI's K3 SoCs Daniel Lezcano

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=167059958735.4906.597495666808063069.tip-bot2@tip-bot2 \
    --to=tip-bot2@linutronix.de \
    --cc=amitk@kernel.org \
    --cc=bb@ti.com \
    --cc=daniel.lezcano@kernel.org \
    --cc=daniel.lezcano@linaro.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rui.zhang@intel.com \
    /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