[PATCH v1 03/18] thermal: Directly use thermal_zone_platform_params for thermal_zone_device

AngeloGioacchino Del Regno angelogioacchino.delregno at collabora.com
Fri Feb 2 02:04:39 PST 2024


Il 01/02/24 20:42, Rafael J. Wysocki ha scritto:
> On Tue, Jan 30, 2024 at 12:13 PM AngeloGioacchino Del Regno
> <angelogioacchino.delregno at collabora.com> wrote:
>>
>> Remove all duplicate members from thermal_zone_device and directly
>> use the corresponding ones from struct thermal_zone_platform_params.
> 
> I totally disagree with this approach.
> 
> It does make sense to store these things in a tz directly.
> 
> 1. devdata allows the caller of the thermal zone to get to their own
> information on it conveniently.  This patch makes it harder.
> 2. It makes sense to copy type into tz to allow the zone creator to
> free the string (should they want to do that).
> 3. It would make sense to copy the contents of the trips[] table to tz
> to allow the zone creator to free their initial table.  This doesn't
> happen today, but it is in the works and your patch goes against this.
> 4. It makes sense to copy num_trips directly to tz, because it is
> closely related to trips[].
> 5. It makes sense to copy ops directly into tz, because this will
> allow zone creators to use const ops for zone registration.  Again,
> this doesn't happen today, but it is in the works and this patch goes
> against this.
> 
> As far as I'm concerned, this one is a total no-go.
> 

I'm sad for all the work that went into this - but at the same time I can also
understand your reasons.

I'll drop this one then!

Cheers,
Angelo

> Thanks!




More information about the linux-arm-kernel mailing list