lkml.org 
[lkml]   [2020]   [Jul]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2 1/5] thermal: core: Add helpers to browse the cdev, tz and governor list
From
Date
On 30/06/2020 20:46, Amit Kucheria wrote:
> On Tue, Jun 30, 2020 at 8:40 PM Zhang Rui <rui.zhang@intel.com> wrote:
>>
>> Hi, Daniel,
>>
>> seems that you forgot to cc linux-pm mailing list.
>>
>> On Tue, 2020-06-30 at 17:16 +0530, Amit Kucheria wrote:
>>> On Thu, Jun 25, 2020 at 8:15 PM Daniel Lezcano
>>> <daniel.lezcano@linaro.org> wrote:
>>>>
>>>> The cdev, tz and governor list, as well as their respective locks
>>>> are
>>>> statically defined in the thermal_core.c file.
>>>>
>>>> In order to give a sane access to these list, like browsing all the
>>>> thermal zones or all the cooling devices, let's define a set of
>>>> helpers where we pass a callback as a parameter to be called for
>>>> each
>>>> thermal entity.
>>>>
>>>> We keep the self-encapsulation and ensure the locks are correctly
>>>> taken when looking at the list.
>>>>
>>>> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
>>>> ---
>>>> drivers/thermal/thermal_core.c | 51
>>>> ++++++++++++++++++++++++++++++++++
>>>
>>> Is the idea to not use thermal_helpers.c from now on? It fits
>>> perfectly with a patch I have to merge all its contents to
>>> thermal_core.c :-)
>>
>> I agree these changes should be in thermal_helper.c
>
> I was actually serious about killing thermal_helper.c :-)
>
> What is the reason for those 5-6 functions to live outside
> thermal_core.c? Functions in thermal_helper.c are called by governors
> and drivers, just like the functions in thermal_core.c. I couldn't
> find a pattern.

I propose to move these functions in the thermal_helper.c for now as
requested by Rui. Then you can send a patch to merge thermal_helper.c to
thermal_core.c after and we can comment the move.



--
<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: 2020-07-01 09:09    [W:0.107 / U:15.600 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site