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

From: Rafael J. Wysocki
Date: Wed Sep 20 2023 - 05:55:15 EST


On Wed, Sep 20, 2023 at 10:12 AM Ido Schimmel <idosch@xxxxxxxxxx> wrote:
>
> 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").

That's correct.

> 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>

Thank you!