From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: Amit Kucheria <amit.kucheria@verdurent.com>,
Willy Wolff <willy.mh.wolff.ml@gmail.com>
Cc: Amit Daniel Kachhap <amit.kachhap@gmail.com>,
Viresh Kumar <viresh.kumar@linaro.org>,
Javi Merino <javi.merino@kernel.org>,
Zhang Rui <rui.zhang@intel.com>,
Linux PM list <linux-pm@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
"Rafael J.Wysocki" <rjw@rjwysocki.net>
Subject: Re: [PATCH] thermal/drivers/cpufreq_cooling: Fix return of cpufreq_set_cur_state
Date: Mon, 23 Mar 2020 22:08:38 +0100 [thread overview]
Message-ID: <b30a2e5b-5fa6-9761-efe1-d3b5396ceaaa@linaro.org> (raw)
In-Reply-To: <CAHLCerOFg30GEaQgV=4ccgA1fG6P3OTgaG33pw-3YCtuD5mSmA@mail.gmail.com>
On 23/03/2020 22:05, Amit Kucheria wrote:
> Hi Willy,
>
> On Sat, Mar 21, 2020 at 2:57 PM Willy Wolff <willy.mh.wolff.ml@gmail.com> wrote:
>>
>> The function freq_qos_update_request returns 0 or 1 describing update
>> effectiveness, and a negative error code on failure. However,
>> cpufreq_set_cur_state returns 0 on success or an error code otherwise.
>>
>
> Please improve the commit message with context from your earlier bug
> report thread and a summary of how the problem shows up.
I've improved the commit message when applied:
https://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux.git/commit/?h=testing&id=ff44f672d74178b3be19d41a169b98b3e391d4ce
>> Signed-off-by: Willy Wolff <willy.mh.wolff.ml@gmail.com>
>> ---
>> drivers/thermal/cpufreq_cooling.c | 6 ++++--
>> 1 file changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/thermal/cpufreq_cooling.c b/drivers/thermal/cpufreq_cooling.c
>> index fe83d7a210d4..af55ac08e1bd 100644
>> --- a/drivers/thermal/cpufreq_cooling.c
>> +++ b/drivers/thermal/cpufreq_cooling.c
>> @@ -431,6 +431,7 @@ static int cpufreq_set_cur_state(struct thermal_cooling_device *cdev,
>> unsigned long state)
>> {
>> struct cpufreq_cooling_device *cpufreq_cdev = cdev->devdata;
>> + int ret;
>>
>> /* Request state should be less than max_level */
>> if (WARN_ON(state > cpufreq_cdev->max_level))
>> @@ -442,8 +443,9 @@ static int cpufreq_set_cur_state(struct thermal_cooling_device *cdev,
>>
>> cpufreq_cdev->cpufreq_state = state;
>>
>> - return freq_qos_update_request(&cpufreq_cdev->qos_req,
>> - get_state_freq(cpufreq_cdev, state));
>> + ret = freq_qos_update_request(&cpufreq_cdev->qos_req,
>> + get_state_freq(cpufreq_cdev, state));
>> + return ret < 0 ? ret : 0;
>> }
>>
>> /* Bind cpufreq callbacks to thermal cooling device ops */
>> --
>> 2.20.1
>>
--
<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
next prev parent reply other threads:[~2020-03-23 21:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-21 9:27 Willy Wolff
2020-03-23 3:17 ` Viresh Kumar
2020-03-23 21:05 ` Amit Kucheria
2020-03-23 21:08 ` Daniel Lezcano [this message]
2020-03-24 7:45 ` Willy Wolff
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=b30a2e5b-5fa6-9761-efe1-d3b5396ceaaa@linaro.org \
--to=daniel.lezcano@linaro.org \
--cc=amit.kachhap@gmail.com \
--cc=amit.kucheria@verdurent.com \
--cc=javi.merino@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@rjwysocki.net \
--cc=rui.zhang@intel.com \
--cc=viresh.kumar@linaro.org \
--cc=willy.mh.wolff.ml@gmail.com \
/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
all inboxes | Powered by JetHome®