]> www.infradead.org Git - nvme.git/commitdiff
thermal/debugfs: Allow tze_seq_show() to print statistics for invalid trips
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 23 May 2024 15:58:42 +0000 (17:58 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 27 May 2024 11:00:00 +0000 (13:00 +0200)
Commit a6258fde8de3 ("thermal/debugfs: Make tze_seq_show() skip invalid
trips and trips with no stats") modified tze_seq_show() to skip invalid
trips, but it overlooked the fact that a trip may become invalid during
a mitigation eposide involving it, in which case its statistics should
still be reported.

For this reason, remove the invalid trip temperature check from the
main loop in tze_seq_show().

The trips that have never been valid will still be skipped after this
change because there are no statistics to report for them.

Fixes: a6258fde8de3 ("thermal/debugfs: Make tze_seq_show() skip invalid trips and trips with no stats")
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/thermal/thermal_debugfs.c

index e0e4eb6fad3975ab72dce748d8c4158c067861c0..9424472291570861de5e68a27f8e0d7fa00f8964 100644 (file)
@@ -802,10 +802,6 @@ static int tze_seq_show(struct seq_file *s, void *v)
                const struct thermal_trip *trip = &td->trip;
                struct trip_stats *trip_stats;
 
-               /* Skip invalid trips. */
-               if (trip->temperature == THERMAL_TEMP_INVALID)
-                       continue;
-
                /*
                 * There is no possible mitigation happening at the
                 * critical trip point, so the stats will be always