lkml.org 
[lkml]   [2022]   [Jul]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v5 11/12] thermal/of: Use thermal trips stored in the thermal zone
From
On 22/07/2022 18:50, Rafael J. Wysocki wrote:
> On Thu, Jul 21, 2022 at 11:29 PM Daniel Lezcano
> <daniel.lezcano@linexp.org> wrote:
>>
>> On 19/07/2022 20:26, Rafael J. Wysocki wrote:
>>> On Sun, Jul 10, 2022 at 2:35 PM Daniel Lezcano
>>> <daniel.lezcano@linexp.org> wrote:
>>>> Now that we have the thermal trip stored in the thermal zone in a
>>>> generic way, we can rely on them and remove one indirection we found
>>>> in the thermal_of code and do one more step forward the removal of the
>>>> duplicated structures.
>>>>
>>>> Cc: Alexandre Bailon <abailon@baylibre.com>
>>>> Cc: Kevin Hilman <khilman@baylibre.com>
>>>> Signed-off-by: Daniel Lezcano <daniel.lezcano@linexp.org>
>>>> ---
>>>> drivers/thermal/thermal_of.c | 53 +++++++++++-------------------------
>>>> 1 file changed, 16 insertions(+), 37 deletions(-)
>>>>
>>>> diff --git a/drivers/thermal/thermal_of.c b/drivers/thermal/thermal_of.c
>>>> index e187461dd396..601552c55d0b 100644
>>>> --- a/drivers/thermal/thermal_of.c
>>>> +++ b/drivers/thermal/thermal_of.c
>>>> @@ -118,12 +118,7 @@ static int of_thermal_set_trips(struct thermal_zone_device *tz,
>>>> */
>>>> int of_thermal_get_ntrips(struct thermal_zone_device *tz)
>>>> {
>>>> - struct __thermal_zone *data = tz->devdata;
>>>> -
>>>> - if (!data || IS_ERR(data))
>>>> - return -ENODEV;
>>>> -
>>>> - return data->ntrips;
>>>> + return tz->ntrips;
>>> Hasn't this been renamed to num_trips?
>>
>> Right, it is changed in patch 12/12
>
> Well, what about combining them, then?

Yes, absolutely

--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

\
 
 \ /
  Last update: 2022-07-22 19:25    [from the cache]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog