Re: [PATCH v1] thermal: core: Drop trips_disabled bitmask

From: Ido Schimmel
Date: Wed Sep 20 2023 - 04:12:56 EST


On Tue, Sep 19, 2023 at 08:54:37PM +0200, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
>
> After recent changes, thermal_zone_get_trip() cannot fail, as invoked
> from thermal_zone_device_register_with_trips(), so the only role of
> the trips_disabled bitmask is struct thermal_zone_device is to make
> handle_thermal_trip() skip trip points whose temperature was initially
> zero. However, since the unit of temperature in the thermal core is
> millicelsius, zero may very well be a valid temperature value at least
> in some usage scenarios and the trip temperature may as well change
> later. Thus there is no reason to permanently disable trip points
> with initial temperature equal to zero.
>
> Accordingly, drop the trips_disabled bitmask along with the code
> related to it.
>
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>

I guess I was copied because of commit f1b80a3878b2 ("thermal: core:
Restore behavior regarding invalid trip points"). Since then we stopped
relying on this behavior with commit 5601ef91fba8 ("mlxsw: core_thermal:
Use static trip points for transceiver modules").

Tested your patch and didn't see any regressions:

Tested-by: Ido Schimmel <idosch@xxxxxxxxxx>

Thanks