diff options
| author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2025-08-25 15:27:46 +0200 |
|---|---|---|
| committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2025-09-04 21:28:01 +0200 |
| commit | 28cef1632339ac54253e8eef89726a6e0a349939 (patch) | |
| tree | ad69828f9d6fc4519c9dcd32a39bb2a0d1ba0c40 | |
| parent | b320789d6883cc00ac78ce83bccbfe7ed58afcf0 (diff) | |
thermal: gov_step_wise: Clean up local variable initialization
Make the initialization of local variable throttle in
thermal_zone_trip_update() more straightforward.
No intentional functional impact.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>
Link: https://patch.msgid.link/6203592.lOV4Wx5bFT@rafael.j.wysocki
| -rw-r--r-- | drivers/thermal/gov_step_wise.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/thermal/gov_step_wise.c b/drivers/thermal/gov_step_wise.c index d1bb59f1dfbd..6506ae270101 100644 --- a/drivers/thermal/gov_step_wise.c +++ b/drivers/thermal/gov_step_wise.c @@ -69,16 +69,14 @@ static void thermal_zone_trip_update(struct thermal_zone_device *tz, const struct thermal_trip_desc *td, int trip_threshold) { + bool throttle = tz->temperature >= trip_threshold; const struct thermal_trip *trip = &td->trip; enum thermal_trend trend = get_tz_trend(tz, trip); int trip_id = thermal_zone_trip_id(tz, trip); struct thermal_instance *instance; - bool throttle = false; - if (tz->temperature >= trip_threshold) { - throttle = true; + if (throttle) trace_thermal_zone_trip(tz, trip_id, trip->type); - } dev_dbg(&tz->device, "Trip%d[type=%d,temp=%d]:trend=%d,throttle=%d\n", trip_id, trip->type, trip_threshold, trend, throttle); |
