From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Yue Hu <zbestahu@gmail.com>
Cc: viresh.kumar@linaro.org, rafael.j.wysocki@intel.com,
linux-pm@vger.kernel.org, huyue2@yulong.com
Subject: Re: [PATCH] cpufreq: Remove needless bios_limit check in show_bios_limit()
Date: Wed, 01 May 2019 12:23:50 +0200 [thread overview]
Message-ID: <21353710.QnO7stapYA@kreacher> (raw)
In-Reply-To: <20190416024027.6516-1-zbestahu@gmail.com>
On Tuesday, April 16, 2019 4:40:27 AM CEST Yue Hu wrote:
> From: Yue Hu <huyue2@yulong.com>
>
> Initially, bios_limit attribute will be created if driver->bios_limit
> is set in cpufreq_add_dev_interface(). So remove the redundant check
> for latter show operation.
>
> Signed-off-by: Yue Hu <huyue2@yulong.com>
> ---
> drivers/cpufreq/cpufreq.c | 8 +++-----
> 1 file changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
> index d9123de..047662b 100644
> --- a/drivers/cpufreq/cpufreq.c
> +++ b/drivers/cpufreq/cpufreq.c
> @@ -857,11 +857,9 @@ static ssize_t show_bios_limit(struct cpufreq_policy *policy, char *buf)
> {
> unsigned int limit;
> int ret;
> - if (cpufreq_driver->bios_limit) {
> - ret = cpufreq_driver->bios_limit(policy->cpu, &limit);
> - if (!ret)
> - return sprintf(buf, "%u\n", limit);
> - }
> + ret = cpufreq_driver->bios_limit(policy->cpu, &limit);
> + if (!ret)
> + return sprintf(buf, "%u\n", limit);
> return sprintf(buf, "%u\n", policy->cpuinfo.max_freq);
> }
>
>
Applied, thanks!
prev parent reply other threads:[~2019-05-01 10:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-16 2:40 [PATCH] cpufreq: Remove needless bios_limit check in show_bios_limit() Yue Hu
2019-04-16 13:00 ` Viresh Kumar
2019-05-01 10:23 ` Rafael J. Wysocki [this message]
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=21353710.QnO7stapYA@kreacher \
--to=rjw@rjwysocki.net \
--cc=huyue2@yulong.com \
--cc=linux-pm@vger.kernel.org \
--cc=rafael.j.wysocki@intel.com \
--cc=viresh.kumar@linaro.org \
--cc=zbestahu@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