diff mbox series

[thermal:,thermal/next] thermal/core: Remove pointless test with the THERMAL_TRIPS_NONE macro

Message ID 161109164668.414.11957267023735359312.tip-bot2@tip-bot2
State New
Headers show
Series [thermal:,thermal/next] thermal/core: Remove pointless test with the THERMAL_TRIPS_NONE macro | expand

Commit Message

thermal-bot for Julien Panis Jan. 19, 2021, 9:27 p.m. UTC
The following commit has been merged into the thermal/next branch of thermal:

Commit-ID:     53f04ca8153cc043cd2fa968ed451a85e8f70bd8
Gitweb:        https://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux.git//53f04ca8153cc043cd2fa968ed451a85e8f70bd8
Author:        Daniel Lezcano <daniel.lezcano@linaro.org>
AuthorDate:    Tue, 15 Dec 2020 00:38:06 +01:00
Committer:     Daniel Lezcano <daniel.lezcano@linaro.org>
CommitterDate: Tue, 19 Jan 2021 22:23:11 +01:00

thermal/core: Remove pointless test with the THERMAL_TRIPS_NONE macro

The THERMAL_TRIPS_NONE is equal to -1, it is pointless to do a
conversion in this function.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Reviewed-by: Thara Gopinath <thara.gopinath@linaro.org>
Link: https://lore.kernel.org/r/20201214233811.485669-3-daniel.lezcano@linaro.org
---
 drivers/thermal/thermal_sysfs.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/drivers/thermal/thermal_sysfs.c b/drivers/thermal/thermal_sysfs.c
index 4e7f9e8..345917a 100644
--- a/drivers/thermal/thermal_sysfs.c
+++ b/drivers/thermal/thermal_sysfs.c
@@ -875,10 +875,7 @@  trip_point_show(struct device *dev, struct device_attribute *attr, char *buf)
 	instance =
 	    container_of(attr, struct thermal_instance, attr);
 
-	if (instance->trip == THERMAL_TRIPS_NONE)
-		return sprintf(buf, "-1\n");
-	else
-		return sprintf(buf, "%d\n", instance->trip);
+	return sprintf(buf, "%d\n", instance->trip);
 }
 
 ssize_t