projects
/
linux
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a20b995
)
thermal/core: Remove pointless test with the THERMAL_TRIPS_NONE macro
author
Daniel Lezcano
<daniel.lezcano@linaro.org>
Mon, 14 Dec 2020 23:38:06 +0000
(
00:38
+0100)
committer
Daniel Lezcano
<daniel.lezcano@linaro.org>
Tue, 19 Jan 2021 21:23:11 +0000
(22:23 +0100)
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
patch
|
blob
|
history
diff --git
a/drivers/thermal/thermal_sysfs.c
b/drivers/thermal/thermal_sysfs.c
index 4e7f9e880d761819b01e1161ae0d868fe427c3d7..345917a58f2fd22e9b80481b0c16bb9b343d05b3 100644
(file)
--- 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