diff mbox series

[5/6] thermal/core: Remove THERMAL_TRIPS_NONE test

Message ID 20201214233811.485669-5-daniel.lezcano@linaro.org
State Accepted
Commit 716072d065b62f5a63d81bee978fd234dc47a83b
Headers show
Series [1/6] thermal/core: Remove the 'forced_passive' option | expand

Commit Message

Daniel Lezcano Dec. 14, 2020, 11:38 p.m. UTC
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 <daniel.lezcano@linaro.org>

---
 drivers/thermal/thermal_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.25.1

Comments

Thara Gopinath Jan. 11, 2021, 11:18 p.m. UTC | #1
On 12/14/20 6:38 PM, Daniel Lezcano wrote:
> 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 <daniel.lezcano@linaro.org>

> ---


Reviewed-by: Thara Gopinath <thara.gopinath@linaro.org>


>   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 a0f0c33c8d9c..bcc2ea4f5482 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) {

> 


-- 
Warm Regards
Thara
diff mbox series

Patch

diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c
index a0f0c33c8d9c..bcc2ea4f5482 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) {