* [RFC][PATCH] cpufreq: db8500: remove unneeded for loop iteration over freq_table
@ 2011-09-27 7:11 Axel Lin
2011-09-27 7:35 ` Linus Walleij
0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2011-09-27 7:11 UTC (permalink / raw)
To: linux-kernel; +Cc: Dave Jones, Vincent Guittot, Linus Walleij, cpufreq
Don't know why to do the loop iteration here. It looks unneeded.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
drivers/cpufreq/db8500-cpufreq.c | 5 -----
1 files changed, 0 insertions(+), 5 deletions(-)
diff --git a/drivers/cpufreq/db8500-cpufreq.c b/drivers/cpufreq/db8500-cpufreq.c
index d90456a..bdb349a 100644
--- a/drivers/cpufreq/db8500-cpufreq.c
+++ b/drivers/cpufreq/db8500-cpufreq.c
@@ -104,7 +104,6 @@ static unsigned int db8500_cpufreq_getspeed(unsigned int cpu)
static int __cpuinit db8500_cpufreq_init(struct cpufreq_policy *policy)
{
int res;
- int i;
BUILD_BUG_ON(ARRAY_SIZE(idx2opp) + 1 != ARRAY_SIZE(freq_table));
@@ -127,10 +126,6 @@ static int __cpuinit db8500_cpufreq_init(struct cpufreq_policy *policy)
policy->min = policy->cpuinfo.min_freq;
policy->max = policy->cpuinfo.max_freq;
policy->cur = db8500_cpufreq_getspeed(policy->cpu);
-
- for (i = 0; freq_table[i].frequency != policy->cur; i++)
- ;
-
policy->governor = CPUFREQ_DEFAULT_GOVERNOR;
/*
--
1.7.4.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [RFC][PATCH] cpufreq: db8500: remove unneeded for loop iteration over freq_table
2011-09-27 7:11 [RFC][PATCH] cpufreq: db8500: remove unneeded for loop iteration over freq_table Axel Lin
@ 2011-09-27 7:35 ` Linus Walleij
0 siblings, 0 replies; 2+ messages in thread
From: Linus Walleij @ 2011-09-27 7:35 UTC (permalink / raw)
To: Axel Lin
Cc: linux-kernel, Dave Jones, Vincent Guittot, cpufreq, Jonas ABERG,
Samuel Ortiz
On Tue, Sep 27, 2011 at 9:11 AM, Axel Lin <axel.lin@gmail.com> wrote:
> Don't know why to do the loop iteration here. It looks unneeded.
I'm OK with this going in, however I already have another patch
on the CPUfreq driver pending for review that is more crucial and
hopefully can go in first?
It sure looks odd. Jonas has some refactorings done on the
CPUfreq driver, however they are dependent on the PRCMU update
that is pending review for the MFD tree to go in first, so there
is some code stacking up cross-subsystemwise right now.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-09-27 7:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-27 7:11 [RFC][PATCH] cpufreq: db8500: remove unneeded for loop iteration over freq_table Axel Lin
2011-09-27 7:35 ` Linus Walleij
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox