aboutsummaryrefslogtreecommitdiff
path: root/lib/test_fortify/write_overflow-strncpy.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <[email protected]>2024-08-13 16:29:11 +0200
committerRafael J. Wysocki <[email protected]>2024-08-16 13:13:59 +0200
commit6e6f58a170ea98e44075b761f2da42a5aec47dfb (patch)
tree9737c20afa4430d792cd6028d15f8ed2a4e37b28 /lib/test_fortify/write_overflow-strncpy.c
parent5f64b4a1ab1b0412446d42e1fc2964c2cdb60b27 (diff)
thermal: gov_bang_bang: Use governor_data to reduce overhead
After running once, the for_each_trip_desc() loop in bang_bang_manage() is pure needless overhead because it is not going to make any changes unless a new cooling device has been bound to one of the trips in the thermal zone or the system is resuming from sleep. For this reason, make bang_bang_manage() set governor_data for the thermal zone and check it upfront to decide whether or not it needs to do anything. However, governor_data needs to be reset in some cases to let bang_bang_manage() know that it should walk the trips again, so add an .update_tz() callback to the governor and make the core additionally invoke it during system resume. To avoid affecting the other users of that callback unnecessarily, add a special notification reason for system resume, THERMAL_TZ_RESUME, and also pass it to __thermal_zone_device_update() called during system resume for consistency. Signed-off-by: Rafael J. Wysocki <[email protected]> Acked-by: Peter Kästle <[email protected]> Reviewed-by: Zhang Rui <[email protected]> Cc: 6.10+ <[email protected]> # 6.10+ Link: https://patch.msgid.link/[email protected]
Diffstat (limited to 'lib/test_fortify/write_overflow-strncpy.c')
0 files changed, 0 insertions, 0 deletions