Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1601012
| From | Viresh Kumar <viresh.kumar@linaro.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] cpufreq: Fix and clean up show_cpuinfo_cur_freq() |
| Date | 2017-03-15 04:10 +0100 |
| Message-ID | <tl7u3-1nM-15@gated-at.bofh.it> (permalink) |
| References | <tl3Ts-7ky-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] cpufreq: Fix and clean up show_cpuinfo_cur_freq() "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-03-15 00:20 +0100 Re: [PATCH] cpufreq: Fix and clean up show_cpuinfo_cur_freq() Viresh Kumar <viresh.kumar@linaro.org> - 2017-03-15 04:10 +0100
csiph-web