thermal: gov_step_wise: Clean up thermal_zone_trip_update()
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 10 Apr 2024 16:44:14 +0000 (18:44 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 24 Apr 2024 08:14:58 +0000 (10:14 +0200)
commitfe036266504796c84adee28b64c347d3acf4206e
tree77805fe1765b540993b8bc3f3f1c7bf4121de7c6
parente4065f144fa60df56a8596bdc364a5b4fe8cbf40
thermal: gov_step_wise: Clean up thermal_zone_trip_update()

Do some assorted cleanups in thermal_zone_trip_update():

 * Compute the trend value upfront.
 * Move old_target definition to the block where it is used.
 * Adjust white space around diagnostic messages and locking.
 * Use suitable field formatting in a message to avoid an explicit
   cast to int.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>
drivers/thermal/gov_step_wise.c