[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <51500C81.7040307@ti.com>
Date: Mon, 25 Mar 2013 14:06:17 +0530
From: Sekhar Nori <nsekhar@...com>
To: Viresh Kumar <viresh.kumar@...aro.org>
CC: <rjw@...k.pl>, <arvind.chauhan@....com>, <robin.randhawa@....com>,
<Steve.Bannister@....com>, <Liviu.Dudau@....com>,
<charles.garcia-tobin@....com>, <cpufreq@...r.kernel.org>,
<linux-pm@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<linaro-kernel@...ts.linaro.org>,
Sascha Hauer <kernel@...gutronix.de>,
Paul Mundt <lethal@...ux-sh.org>, <linux-sh@...r.kernel.org>,
<linux-omap@...r.kernel.org>
Subject: Re: [PATCH 2/2] cpufreq: drivers: Remove unnecessary assignments
of policy-> members
On 3/24/2013 8:59 PM, Viresh Kumar wrote:
> Some assignments of policy-> min/max/cur/cpuinfo.min_freq/cpuinfo.max_freq
> aren't required as part of it is done by cpufreq driver or cpufreq core.
>
> Remove them.
>
> At some places we merge multiple lines together too.
>
> Cc: Sekhar Nori <nsekhar@...com>
> Cc: Sascha Hauer <kernel@...gutronix.de>
> Cc: Paul Mundt <lethal@...ux-sh.org>
> Cc: linux-sh@...r.kernel.org
> Cc: linux-omap@...r.kernel.org
> Signed-off-by: Viresh Kumar <viresh.kumar@...aro.org>
> ---
> Documentation/cpu-freq/cpu-drivers.txt | 5 +++--
> arch/arm/mach-davinci/cpufreq.c | 4 ----
> arch/arm/mach-imx/cpufreq.c | 3 ---
> arch/sh/kernel/cpufreq.c | 9 +++------
> drivers/cpufreq/cpufreq-nforce2.c | 6 ++----
> drivers/cpufreq/omap-cpufreq.c | 4 +---
> 6 files changed, 9 insertions(+), 22 deletions(-)
>
> diff --git a/Documentation/cpu-freq/cpu-drivers.txt b/Documentation/cpu-freq/cpu-drivers.txt
> index 72f70b1..c94383f 100644
> --- a/Documentation/cpu-freq/cpu-drivers.txt
> +++ b/Documentation/cpu-freq/cpu-drivers.txt
> @@ -108,8 +108,9 @@ policy->governor must contain the "default policy" for
> cpufreq_driver.target is called with
> these values.
>
> -For setting some of these values, the frequency table helpers might be
> -helpful. See the section 2 for more information on them.
> +For setting some of these values (cpuinfo.min[max]_freq, policy->min[max]), the
> +frequency table helpers might be helpful. See the section 2 for more information
> +on them.
>
> SMP systems normally have same clock source for a group of cpus. For these the
> .init() would be called only once for the first online cpu. Here the .init()
> diff --git a/arch/arm/mach-davinci/cpufreq.c b/arch/arm/mach-davinci/cpufreq.c
> index 8fb0c2a..ff46862 100644
> --- a/arch/arm/mach-davinci/cpufreq.c
> +++ b/arch/arm/mach-davinci/cpufreq.c
> @@ -149,10 +149,6 @@ static int davinci_cpu_init(struct cpufreq_policy *policy)
> policy->cpuinfo.max_freq = policy->max;
> }
>
> - policy->min = policy->cpuinfo.min_freq;
> - policy->max = policy->cpuinfo.max_freq;
> - policy->cur = davinci_getspeed(0);
There is a line in the code a little above the ones you deleted that
also sets these same variables. I guess you were relying on that line to
set policy->cur, but that also sets policy->{min, max} which can be
cleaned up.
Thanks,
Sekhar
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists