Re: [PATCH v1 04/10] thermal: core: Rearrange __thermal_zone_device_update()

From: Lukasz Luba
Date: Thu Oct 24 2024 - 06:19:07 EST




On 10/16/24 12:26, Rafael J. Wysocki wrote:
From: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>

In preparation for subsequent changes, move the invocations of
thermal_thresholds_handle() and thermal_zone_set_trips() in
__thermal_zone_device_update() after the processing of the
temporary trip lists.

No intentional functional impact.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
---
drivers/thermal/thermal_core.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

Index: linux-pm/drivers/thermal/thermal_core.c
===================================================================
--- linux-pm.orig/drivers/thermal/thermal_core.c
+++ linux-pm/drivers/thermal/thermal_core.c
@@ -588,10 +588,6 @@ void __thermal_zone_device_update(struct
high = td->threshold;
}
- thermal_thresholds_handle(tz, &low, &high);
-
- thermal_zone_set_trips(tz, low, high);
-
list_for_each_entry_safe(td, next, &way_up_list, list_node) {
thermal_trip_crossed(tz, &td->trip, governor, true);
list_del_init(&td->list_node);
@@ -602,6 +598,10 @@ void __thermal_zone_device_update(struct
list_del_init(&td->list_node);
}
+ thermal_thresholds_handle(tz, &low, &high);
+
+ thermal_zone_set_trips(tz, low, high);
+
if (governor->manage)
governor->manage(tz);





Reviewed-by: Lukasz Luba <lukasz.luba@xxxxxxx>