Commit dbe0a7be authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull thermal control fix from Rafael Wysocki:
 "This prevents the thermal debug code from attempting to divide by zero
  and corrects trip point statistics (Rafael Wysocki)"

* tag 'thermal-6.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  thermal/debugfs: Add missing count increment to thermal_debug_tz_trip_up()
parents 3c08ab6d b552f63c
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -616,6 +616,7 @@ void thermal_debug_tz_trip_up(struct thermal_zone_device *tz,
	tze->trip_stats[trip_id].timestamp = now;
	tze->trip_stats[trip_id].max = max(tze->trip_stats[trip_id].max, temperature);
	tze->trip_stats[trip_id].min = min(tze->trip_stats[trip_id].min, temperature);
	tze->trip_stats[trip_id].count++;
	tze->trip_stats[trip_id].avg = tze->trip_stats[trip_id].avg +
		(temperature - tze->trip_stats[trip_id].avg) /
		tze->trip_stats[trip_id].count;