* [PATCH] thermal/sysfs: remove unnecessary check in trip_point_hyst_show()
@ 2022-10-15 8:27 Dan Carpenter
2022-10-17 7:21 ` Daniel Lezcano
2022-12-09 15:26 ` [thermal: thermal/next] " thermal-bot for Dan Carpenter
0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2022-10-15 8:27 UTC (permalink / raw)
To: Rafael J. Wysocki, Daniel Lezcano
Cc: Daniel Lezcano, Amit Kucheria, Zhang Rui, linux-pm,
kernel-janitors
The "ret" variable is zero at this point. No need to check.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
drivers/thermal/thermal_sysfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/thermal/thermal_sysfs.c b/drivers/thermal/thermal_sysfs.c
index 8d7b25ab67c2..af3dced054f3 100644
--- a/drivers/thermal/thermal_sysfs.c
+++ b/drivers/thermal/thermal_sysfs.c
@@ -190,7 +190,7 @@ trip_point_hyst_show(struct device *dev, struct device_attribute *attr,
if (ret)
return ret;
- return ret ? ret : sprintf(buf, "%d\n", trip.hysteresis);
+ return sprintf(buf, "%d\n", trip.hysteresis);
}
static ssize_t
--
2.35.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] thermal/sysfs: remove unnecessary check in trip_point_hyst_show()
2022-10-15 8:27 [PATCH] thermal/sysfs: remove unnecessary check in trip_point_hyst_show() Dan Carpenter
@ 2022-10-17 7:21 ` Daniel Lezcano
2022-12-09 15:26 ` [thermal: thermal/next] " thermal-bot for Dan Carpenter
1 sibling, 0 replies; 3+ messages in thread
From: Daniel Lezcano @ 2022-10-17 7:21 UTC (permalink / raw)
To: Dan Carpenter, Rafael J. Wysocki
Cc: Amit Kucheria, Zhang Rui, linux-pm, kernel-janitors
On 15/10/2022 10:27, Dan Carpenter wrote:
> The "ret" variable is zero at this point. No need to check.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
Applied, thanks
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
^ permalink raw reply [flat|nested] 3+ messages in thread
* [thermal: thermal/next] thermal/sysfs: remove unnecessary check in trip_point_hyst_show()
2022-10-15 8:27 [PATCH] thermal/sysfs: remove unnecessary check in trip_point_hyst_show() Dan Carpenter
2022-10-17 7:21 ` Daniel Lezcano
@ 2022-12-09 15:26 ` thermal-bot for Dan Carpenter
1 sibling, 0 replies; 3+ messages in thread
From: thermal-bot for Dan Carpenter @ 2022-12-09 15:26 UTC (permalink / raw)
To: linux-pm; +Cc: Dan Carpenter, Daniel Lezcano, rui.zhang, amitk
The following commit has been merged into the thermal/next branch of thermal:
Commit-ID: 1627cd2f820ad90d3249e6b4e6f1dbadfbed0d33
Gitweb: https://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux.git//1627cd2f820ad90d3249e6b4e6f1dbadfbed0d33
Author: Dan Carpenter <dan.carpenter@oracle.com>
AuthorDate: Sat, 15 Oct 2022 11:27:04 +03:00
Committer: Daniel Lezcano <daniel.lezcano@kernel.org>
CommitterDate: Thu, 08 Dec 2022 14:30:43 +01:00
thermal/sysfs: remove unnecessary check in trip_point_hyst_show()
The "ret" variable is zero at this point. No need to check.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/Y0pu2M6kKzIlhCMw@kili
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
drivers/thermal/thermal_sysfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/thermal/thermal_sysfs.c b/drivers/thermal/thermal_sysfs.c
index cef860d..d37133a 100644
--- a/drivers/thermal/thermal_sysfs.c
+++ b/drivers/thermal/thermal_sysfs.c
@@ -226,7 +226,7 @@ trip_point_hyst_show(struct device *dev, struct device_attribute *attr,
mutex_unlock(&tz->lock);
- return ret ? ret : sprintf(buf, "%d\n", trip.hysteresis);
+ return sprintf(buf, "%d\n", trip.hysteresis);
}
static ssize_t
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-12-09 15:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-15 8:27 [PATCH] thermal/sysfs: remove unnecessary check in trip_point_hyst_show() Dan Carpenter
2022-10-17 7:21 ` Daniel Lezcano
2022-12-09 15:26 ` [thermal: thermal/next] " thermal-bot for Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox