From: Lukasz Luba <lukasz.luba@arm.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>,
linux-pm@vger.kernel.org, quic_manafm@quicinc.com
Subject: Re: [PATCH v5 1/4] thermal/netlink: Add the commands and the events for the thresholds
Date: Tue, 22 Oct 2024 11:20:03 +0100 [thread overview]
Message-ID: <8bda9e15-cba9-48ce-a46d-71d8ac921d0c@arm.com> (raw)
In-Reply-To: <CAJZ5v0iaYys8H_AcM_5SHHy0LxzZkok4sx=jji1wOGjZ+30rzg@mail.gmail.com>
On 10/22/24 11:01, Rafael J. Wysocki wrote:
> Hi Lukasz,
>
> On Tue, Oct 22, 2024 at 11:39 AM Lukasz Luba <lukasz.luba@arm.com> wrote:
>>
>> Hi Daniel,
>>
>> On 10/22/24 08:09, Daniel Lezcano wrote:
>>> On 22/10/2024 00:02, Lukasz Luba wrote:
>>>>
>>>>
>>>> On 10/14/24 10:43, Daniel Lezcano wrote:
>>>>> The thresholds exist but there is no notification neither action code
>>>>> related to them yet.
>>>>>
>>>>> These changes implement the netlink for the notifications when the
>>>>> thresholds are crossed, added, deleted or flushed as well as the
>>>>> commands which allows to get the list of the thresholds, flush them,
>>>>> add and delete.
>>>>>
>>>>> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
>>>>> ---
>>>
>>> [ ... ]
>>>
>>>>> +static inline int thermal_notify_threshold_up(const struct
>>>>> thermal_zone_device *tz)
>>>>> +{
>>>>> + return 0;
>>>>> +}
>>>>
>>>> These 'return 0' look a bit odd. We usually use 'return -EINVAL' in
>>>> not defined. Although, since we don't check the output of those
>>>> functions - we are OK. We just have to remember about these zeros,
>>>> one day when we would like to add the check of the return.
>>>
>>> The return error really depends on the context of the call site. There
>>> are other subsystems returning 0 when the service is not enabled (eg.
>>> cpufreq.h, devfreq.h, device_cgroup.h, etc ...)
>>>
>>>
>>
>> Fair enough. As I said, we would just keep them in mind if we one
>> day decide to add the checks of the returns.
>>
>> I'm waiting for your next version with the new locking scheme that
>> Rafael asked and I will add my review tags.
>
> My plan was to take this patch and replace the open-coded locking with
> guards when applying it (that would be a mechanical change AFAICS).
>
> I guess it's OK to add a R-by from you in that case?
Yes, please add. I know what you are going to add there, so:
Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>
next prev parent reply other threads:[~2024-10-22 10:18 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-14 9:43 [PATCH v5 0/4] Add thermal user thresholds support Daniel Lezcano
2024-10-14 9:43 ` [PATCH v5 1/4] thermal/netlink: Add the commands and the events for the thresholds Daniel Lezcano
2024-10-21 10:58 ` Rafael J. Wysocki
2024-10-21 19:42 ` Lukasz Luba
2024-10-21 19:47 ` Rafael J. Wysocki
2024-10-21 19:51 ` Lukasz Luba
2024-10-21 22:02 ` Lukasz Luba
2024-10-22 7:09 ` Daniel Lezcano
2024-10-22 9:40 ` Lukasz Luba
2024-10-22 10:01 ` Rafael J. Wysocki
2024-10-22 10:20 ` Lukasz Luba [this message]
2024-10-14 9:43 ` [PATCH v5 2/4] tools/lib/thermal: Make more generic the command encoding function Daniel Lezcano
2024-10-21 19:49 ` Lukasz Luba
2024-10-22 7:12 ` Daniel Lezcano
2024-10-22 9:43 ` Lukasz Luba
2024-10-14 9:43 ` [PATCH v5 3/4] tools/lib/thermal: Add the threshold netlink ABI Daniel Lezcano
2024-10-21 20:47 ` Lukasz Luba
2024-10-22 7:49 ` Daniel Lezcano
2024-10-22 9:50 ` Lukasz Luba
2024-10-22 13:21 ` Daniel Lezcano
2024-10-14 9:43 ` [PATCH v5 4/4] tools/thermal/thermal-engine: Take into account the thresholds API Daniel Lezcano
2024-10-21 20:10 ` Lukasz Luba
2024-10-22 7:52 ` Daniel Lezcano
2024-10-21 8:28 ` [PATCH v5 0/4] Add thermal user thresholds support Daniel Lezcano
2024-10-21 8:43 ` Lukasz Luba
2024-10-21 11:02 ` Rafael J. Wysocki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8bda9e15-cba9-48ce-a46d-71d8ac921d0c@arm.com \
--to=lukasz.luba@arm.com \
--cc=daniel.lezcano@linaro.org \
--cc=linux-pm@vger.kernel.org \
--cc=quic_manafm@quicinc.com \
--cc=rafael@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox