Thread (21 messages) 21 messages, 4 authors, 2021-01-19

[thermal: thermal/next] thermal/core: Remove THERMAL_TRIPS_NONE test

From: thermal-bot for Daniel Lezcano <hidden>
Date: 2021-01-19 21:32:50
Subsystem: the rest, thermal · Maintainers: Linus Torvalds, Rafael J. Wysocki, Daniel Lezcano

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

Commit-ID:     716072d065b62f5a63d81bee978fd234dc47a83b
Gitweb:        https://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux.git//716072d065b62f5a63d81bee978fd234dc47a83b
Author:        Daniel Lezcano [off-list ref]
AuthorDate:    Tue, 15 Dec 2020 00:38:08 +01:00
Committer:     Daniel Lezcano [off-list ref]
CommitterDate: Tue, 19 Jan 2021 22:23:25 +01:00

thermal/core: Remove THERMAL_TRIPS_NONE test

The last site calling the thermal_zone_bind_cooling_device() function
with the THERMAL_TRIPS_NONE parameter was removed.

We can get rid of this test as no user of this function is calling
this function with this parameter.

Signed-off-by: Daniel Lezcano <redacted>
Reviewed-by: Thara Gopinath <redacted>
Link: https://lore.kernel.org/r/20201214233811.485669-5-daniel.lezcano@linaro.org (local)
---
 drivers/thermal/thermal_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c
index a0f0c33..bcc2ea4 100644
--- a/drivers/thermal/thermal_core.c
+++ b/drivers/thermal/thermal_core.c
@@ -710,7 +710,7 @@ int thermal_zone_bind_cooling_device(struct thermal_zone_device *tz,
 	unsigned long max_state;
 	int result, ret;
 
-	if (trip >= tz->trips || (trip < 0 && trip != THERMAL_TRIPS_NONE))
+	if (trip >= tz->trips || trip < 0)
 		return -EINVAL;
 
 	list_for_each_entry(pos1, &thermal_tz_list, node) {
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help