All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] cpufreq: drivers: don't check range of target freq in .target()
@ 2013-03-24 15:29 Viresh Kumar
  2013-03-24 15:41   ` Viresh Kumar
  2013-03-27 13:55 ` [PATCH 1/2] cpufreq: drivers: don't check range of target freq in .target() Linus Walleij
  0 siblings, 2 replies; 17+ messages in thread
From: Viresh Kumar @ 2013-03-24 15:29 UTC (permalink / raw)
  To: rjw
  Cc: arvind.chauhan, robin.randhawa, Steve.Bannister, Liviu.Dudau,
	charles.garcia-tobin, cpufreq, linux-pm, linux-kernel,
	linaro-kernel, Viresh Kumar, Sekhar Nori, Linus Walleij

Cpufreq core checks the range of target_freq before calling driver->target() and
so we don't need to do it again.

Remove it.

Cc: Sekhar Nori <nsekhar@ti.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 arch/arm/mach-davinci/cpufreq.c  | 9 ---------
 drivers/cpufreq/dbx500-cpufreq.c | 6 ------
 2 files changed, 15 deletions(-)

diff --git a/arch/arm/mach-davinci/cpufreq.c b/arch/arm/mach-davinci/cpufreq.c
index 55eb870..8fb0c2a 100644
--- a/arch/arm/mach-davinci/cpufreq.c
+++ b/arch/arm/mach-davinci/cpufreq.c
@@ -79,15 +79,6 @@ static int davinci_target(struct cpufreq_policy *policy,
 	struct davinci_cpufreq_config *pdata = cpufreq.dev->platform_data;
 	struct clk *armclk = cpufreq.armclk;
 
-	/*
-	 * Ensure desired rate is within allowed range.  Some govenors
-	 * (ondemand) will just pass target_freq=0 to get the minimum.
-	 */
-	if (target_freq < policy->cpuinfo.min_freq)
-		target_freq = policy->cpuinfo.min_freq;
-	if (target_freq > policy->cpuinfo.max_freq)
-		target_freq = policy->cpuinfo.max_freq;
-
 	freqs.old = davinci_getspeed(0);
 	freqs.new = clk_round_rate(armclk, target_freq * 1000) / 1000;
 
diff --git a/drivers/cpufreq/dbx500-cpufreq.c b/drivers/cpufreq/dbx500-cpufreq.c
index 7192a6d..15ed367 100644
--- a/drivers/cpufreq/dbx500-cpufreq.c
+++ b/drivers/cpufreq/dbx500-cpufreq.c
@@ -37,12 +37,6 @@ static int dbx500_cpufreq_target(struct cpufreq_policy *policy,
 	unsigned int idx;
 	int ret;
 
-	/* scale the target frequency to one of the extremes supported */
-	if (target_freq < policy->cpuinfo.min_freq)
-		target_freq = policy->cpuinfo.min_freq;
-	if (target_freq > policy->cpuinfo.max_freq)
-		target_freq = policy->cpuinfo.max_freq;
-
 	/* Lookup the next frequency */
 	if (cpufreq_frequency_table_target(policy, freq_table, target_freq,
 					relation, &idx))
-- 
1.7.12.rc2.18.g61b472e


^ permalink raw reply related	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2013-03-27 13:55 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-24 15:29 [PATCH 1/2] cpufreq: drivers: don't check range of target freq in .target() Viresh Kumar
2013-03-24 15:29 ` [PATCH 2/2] cpufreq: drivers: Remove unnecessary assignments of policy-> members Viresh Kumar
2013-03-24 15:41   ` Viresh Kumar
2013-03-25  8:36   ` Sekhar Nori
2013-03-25  8:48     ` Sekhar Nori
2013-03-25  8:36     ` Sekhar Nori
2013-03-25  8:45     ` Viresh Kumar
2013-03-25  8:57       ` Viresh Kumar
2013-03-25  9:41       ` Sekhar Nori
2013-03-25  9:53         ` Sekhar Nori
2013-03-25  9:41         ` Sekhar Nori
2013-03-25 10:24         ` Viresh Kumar
2013-03-25 10:36           ` Viresh Kumar
2013-03-26  6:06           ` Sekhar Nori
2013-03-26  6:18             ` Sekhar Nori
2013-03-26  6:06             ` Sekhar Nori
2013-03-27 13:55 ` [PATCH 1/2] cpufreq: drivers: don't check range of target freq in .target() Linus Walleij

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.