[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <45422a32-de34-4de1-bcd3-5580386f27f8@collabora.com>
Date: Mon, 12 Feb 2024 11:41:43 +0100
From: AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>
To: "Rafael J. Wysocki" <rafael@...nel.org>,
Dan Carpenter <dan.carpenter@...aro.org>, daniel.lezcano@...aro.org
Cc: miquel.raynal@...tlin.com, rui.zhang@...el.com, lukasz.luba@....com,
support.opensource@...semi.com, shawnguo@...nel.org, s.hauer@...gutronix.de,
kernel@...gutronix.de, festevam@...il.com, linux-imx@....com,
andersson@...nel.org, konrad.dybcio@...aro.org, amitk@...nel.org,
thara.gopinath@...il.com, niklas.soderlund@...natech.se,
srinivas.pandruvada@...ux.intel.com, baolin.wang@...ux.alibaba.com,
u.kleine-koenig@...gutronix.de, hayashi.kunihiko@...ionext.com,
d-gole@...com, linus.walleij@...aro.org,
DLG-Adam.Ward.opensource@...renesas.com, error27@...il.com, heiko@...ech.de,
hdegoede@...hat.com, jernej.skrabec@...il.com, f.fainelli@...il.com,
linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-arm-msm@...r.kernel.org,
linux-renesas-soc@...r.kernel.org, kernel@...labora.com
Subject: Re: [PATCH v1 02/18] thermal: Add new structures and
thermal_zone_device_register()
Il 02/02/24 18:13, Rafael J. Wysocki ha scritto:
> On Fri, Feb 2, 2024 at 9:47 AM Dan Carpenter <dan.carpenter@...aro.org> wrote:
>>
>> On Thu, Feb 01, 2024 at 08:24:15PM +0100, Rafael J. Wysocki wrote:
>>> On Tue, Jan 30, 2024 at 12:13 PM AngeloGioacchino Del Regno
>>>> diff --git a/include/linux/thermal.h b/include/linux/thermal.h
>>>> index 65d8f92a9a0d..7a540b746703 100644
>>>> --- a/include/linux/thermal.h
>>>> +++ b/include/linux/thermal.h
>>>> @@ -149,7 +149,8 @@ struct thermal_cooling_device {
>>>> passive trip point.
>>>> * @need_update: if equals 1, thermal_zone_device_update needs to be invoked.
>>>> * @ops: operations this &thermal_zone_device supports
>>>> - * @tzp: thermal zone parameters
>>>> + * @tzp: Thermal zone parameters
>>>> + * @tgp: Thermal zone governor parameters
>>>> * @governor: pointer to the governor for this thermal zone
>>>> * @governor_data: private pointer for governor data
>>>> * @thermal_instances: list of &struct thermal_instance of this thermal zone
>>>> @@ -184,7 +185,8 @@ struct thermal_zone_device {
>>>> int prev_high_trip;
>>>> atomic_t need_update;
>>>> struct thermal_zone_device_ops *ops;
>>>> - struct thermal_zone_params *tzp;
>>>> + struct thermal_zone_platform_params *tzp;
>>>> + struct thermal_governor_params *tgp;
>>>
>>> I agree with doing a split here, but I'm not sure about moving items
>>> from the arg list to struct thermal_zone_platform_params (as mentioned
>>> above).
>>>
>>> Also the naming is quite inconsistent. IMO it would be better to call
>>> the first pointer "tzpp", rename struct thermal_governor_params to
>>> struct thermal_zone_governor_params and call the second pointer
>>> "tzgp".
>>>
>>
>> The names "tzgp" and "tzpp" look almost identical at first glance.
>> Could we increase the hamming distance somehow?
>
> Good point.
>
> They may as well be gov_params and platform_params AFAIAC.
I'm more for gov_params and zone_params, as the thermal_zone_platform_params is
supposed to get renamed to struct thermal_zone_params in part 2.
Anything against that?
Cheers,
Angelo
Powered by blists - more mailing lists