From: Rafael J. Wysocki Date: Tue, 28 May 2024 16:54:11 +0000 (+0200) Subject: thermal: core: Avoid calling .trip_crossed() for critical and hot trips X-Git-Tag: v6.11-rc1~174^2~3^2^2^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=72196c20c38b50c4293696377145e6c4ad9a7c67;p=thirdparty%2Fkernel%2Flinux.git thermal: core: Avoid calling .trip_crossed() for critical and hot trips Invoking the governor .trip_crossed() callback for critical and hot trips is pointless because they are handled directly by the core, so make thermal_governor_trip_crossed() avoid doing that. Signed-off-by: Rafael J. Wysocki --- diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index 57f20326aa919..8bb63a364cba4 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c @@ -463,6 +463,9 @@ static void thermal_governor_trip_crossed(struct thermal_governor *governor, const struct thermal_trip *trip, bool crossed_up) { + if (trip->type == THERMAL_TRIP_HOT || trip->type == THERMAL_TRIP_CRITICAL) + return; + if (governor->trip_crossed) governor->trip_crossed(tz, trip, crossed_up); }