[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKohpo=5RHRFw_OfVZHAoAR-3xnUTMot6z_h=cWsFFgn=Fzw2Q@mail.gmail.com>
Date: Mon, 25 Mar 2013 15:54:13 +0530
From: Viresh Kumar <viresh.kumar@...aro.org>
To: Sekhar Nori <nsekhar@...com>
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 25 March 2013 15:11, Sekhar Nori <nsekhar@...com> wrote:
> So down in the cpufreq driver probe below, we bail out if freq_table is
> not provided. So all this checking for freq_table in the code you pasted
> above is superfluous. If you can clean that part up and add checking for
> cpufreq_frequency_table_cpuinfo() as you proposed, I will be glad to
> test it out ;)
Attached is the complete patch and following is your fixup for davinci
(just to review):
diff --git a/arch/arm/mach-davinci/cpufreq.c b/arch/arm/mach-davinci/cpufreq.c
index ff46862..7c2e943 100644
--- a/arch/arm/mach-davinci/cpufreq.c
+++ b/arch/arm/mach-davinci/cpufreq.c
@@ -137,18 +137,17 @@ static int davinci_cpu_init(struct cpufreq_policy *policy)
return result;
}
- policy->cur = policy->min = policy->max = davinci_getspeed(0);
-
- if (freq_table) {
- result = cpufreq_frequency_table_cpuinfo(policy, freq_table);
- if (!result)
- cpufreq_frequency_table_get_attr(freq_table,
- policy->cpu);
- } else {
- policy->cpuinfo.min_freq = policy->min;
- policy->cpuinfo.max_freq = policy->max;
+ policy->cur = davinci_getspeed(0);
+
+ result = cpufreq_frequency_table_cpuinfo(policy, freq_table);
+ if (result) {
+ pr_err("%s: cpufreq_frequency_table_cpuinfo() failed",
+ __func__);
+ return result;
}
+ cpufreq_frequency_table_get_attr(freq_table, policy->cpu);
+
/*
* Time measurement across the target() function yields ~1500-1800us
* time taken with no drivers on notification list.
Download attachment "0001-cpufreq-drivers-Remove-unnecessary-assignments-of-po.patch" of type "application/octet-stream" (6364 bytes)
Powered by blists - more mailing lists