It is invalid to call for_each_thermal_trip() on an unregistered thermal
zone anyway, and as per thermal_zone_device_register_with_trips(), the
trips[] table must be present if num_trips is greater than zero for the
given thermal zone.
Hence, the trips check in for_each_thermal_trip() is redundant and so it
can be dropped.
Signed-off-by: Rafael J. Wysocki <email address hidden>
Acked-by: Daniel Lezcano <email address hidden>
Stable-dep-of: e95fa7404716 ("thermal: gov_power_allocator: avoid inability to reset a cdev")
Signed-off-by: Sasha Levin <email address hidden>
FYI, 6.1 didn't backport any of these, even though e95fa7404716 says "5.13+"
6.6.x has this in addition
commit 3a3bbc6911f57e1 c3b4eabf1d098cd e7bf7baeb0
Author: Rafael J. Wysocki <email address hidden>
Date: Tue Sep 19 20:59:53 2023 +0200
thermal: trip: Drop redundant trips check from for_each_ thermal_ trip()
[ Upstream commit a15ffa783ea4210 877886c59566a0d 20f6b2bc09 ]
It is invalid to call for_each_ thermal_ trip() on an unregistered thermal zone_device_ register_ with_trips( ), the
zone anyway, and as per thermal_
trips[] table must be present if num_trips is greater than zero for the
given thermal zone.
Hence, the trips check in for_each_ thermal_ trip() is redundant and so it
can be dropped.
Signed-off-by: Rafael J. Wysocki <email address hidden> allocator: avoid inability to reset a cdev")
Acked-by: Daniel Lezcano <email address hidden>
Stable-dep-of: e95fa7404716 ("thermal: gov_power_
Signed-off-by: Sasha Levin <email address hidden>
FYI, 6.1 didn't backport any of these, even though e95fa7404716 says "5.13+"