Skip to contentSkip to conversation

cpufreq: db8500: remove unneeded for loop iteration for freq_table

PATCH RESEND In review Axel Lin 2 participants 2 messages Oct 27, 2011 CPU frequency scaling framework

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH RESEND 1/1 cpufreq: db8500: remove unneeded for loop iteration for freq_table

We alread did policy->cur = db8500_cpufreq_getspeed(policy->cpu); Don't know why to do the loop iteration here. It looks useless.

---
 drivers/cpufreq/db8500-cpufreq.c |    5 -----
 1 files changed, 0 insertions(+), 5 deletions(-)
drivers/cpufreq/db8500-cpufreq.c +0 -5
index 0da1625..5713f70 100644
@@ -105,7 +105,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));
 
@@ -128,10 +127,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;
 
 	/*
Signature · 1 line
1.7.5.4
#1 lore raw
Quoted 4 lines · Axel Lin

We alread did policy->cur = db8500_cpufreq_getspeed(policy->cpu); Don't know why to do the loop iteration here. It looks useless.

already queued. still waiting for my kernel.org account. (blocked on waiting for gpg signatures to be uploaded)

Dave