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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jan 30, 2024 at 12:13 PM AngeloGioacchino Del Regno
<angelogioacchino.delregno@xxxxxxxxxxxxx> 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.

Thanks!





[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux