From: Viresh Kumar <viresh.kumar@linaro.org>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Linux PM <linux-pm@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Subject: Re: [PATCH] cpufreq: Fix and clean up show_cpuinfo_cur_freq()
Date: Wed, 15 Mar 2017 08:30:21 +0530 [thread overview]
Message-ID: <20170315030021.GA27811@vireshk-i7> (raw)
In-Reply-To: <2254422.RMefVc1hHr@aspire.rjw.lan>
On 15-03-17, 00:12, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>
> There is a missing newline in show_cpuinfo_cur_freq(), so add it,
> but while at it clean it up somewhat too.
>
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> ---
> drivers/cpufreq/cpufreq.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> Index: linux-pm/drivers/cpufreq/cpufreq.c
> ===================================================================
> --- linux-pm.orig/drivers/cpufreq/cpufreq.c
> +++ linux-pm/drivers/cpufreq/cpufreq.c
> @@ -680,9 +680,11 @@ static ssize_t show_cpuinfo_cur_freq(str
> char *buf)
> {
> unsigned int cur_freq = __cpufreq_get(policy);
> - if (!cur_freq)
> - return sprintf(buf, "<unknown>");
> - return sprintf(buf, "%u\n", cur_freq);
> +
> + if (cur_freq)
> + return sprintf(buf, "%u\n", cur_freq);
> +
> + return sprintf(buf, "<unknown>\n");
> }
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
--
viresh
prev parent reply other threads:[~2017-03-15 3:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-14 23:12 [PATCH] cpufreq: Fix and clean up show_cpuinfo_cur_freq() Rafael J. Wysocki
2017-03-15 3:00 ` Viresh Kumar [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=20170315030021.GA27811@vireshk-i7 \
--to=viresh.kumar@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@rjwysocki.net \
--cc=srinivas.pandruvada@linux.intel.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