From: Viresh Kumar <viresh.kumar@linaro.org>
To: rjw@sisk.pl
Cc: cpufreq@vger.kernel.org, linux-pm@vger.kernel.org,
linux-kernel@vger.kernel.org,
Viresh Kumar <viresh.kumar@linaro.org>
Subject: [PATCH 7/9] cpufreq: drivers: don't check range of target freq in .target()
Date: Mon, 1 Apr 2013 18:27:47 +0530 [thread overview]
Message-ID: <c8744f720d5fd8f3312be7d40ae93f36a85ddcad.1364820621.git.viresh.kumar@linaro.org> (raw)
In-Reply-To: <cover.1364820620.git.viresh.kumar@linaro.org>
In-Reply-To: <cover.1364820620.git.viresh.kumar@linaro.org>
Cpufreq core checks the range of target_freq before calling driver->target() and
so we don't need to do it again.
Remove it.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Linus Walleij <linus.walleij@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
next prev parent reply other threads:[~2013-04-01 12:57 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-01 12:57 [PATCH 0/9] CPUFreq Updates & Fixes for 3.10 Viresh Kumar
2013-04-01 12:57 ` [PATCH 1/9] cpufreq: cpu0: Fix mistake in Documentation example Viresh Kumar
2013-04-01 12:57 ` [PATCH 2/9] cpufreq: Documentation: Fix cpufreq_frequency_table name Viresh Kumar
2013-04-01 12:57 ` [PATCH 3/9] cpufreq: cpufreq-cpu0: No need to check cpu number in init() Viresh Kumar
2013-04-01 12:57 ` [PATCH 4/9] cpufreq: cpufreq-cpu0: Call CPUFREQ_POSTCHANGE notifier for failure cases too Viresh Kumar
2013-04-01 12:57 ` [PATCH 5/9] cpufreq: Notify all policy->cpus in cpufreq_notify_transition() Viresh Kumar
2013-04-01 12:57 ` [PATCH 6/9] cpufreq: Don't check if cpu is online/offline for cpufreq callbacks Viresh Kumar
2013-04-01 16:58 ` David Miller
2013-04-01 12:57 ` Viresh Kumar [this message]
2013-04-01 12:57 ` [PATCH 8/9] cpufreq: drivers: Remove unnecessary assignments of policy-> members Viresh Kumar
2013-04-01 12:57 ` [PATCH 9/9] cpufreq: ARM big LITTLE: Add generic cpufreq driver and its DT glue Viresh Kumar
2013-04-01 21:05 ` [PATCH 0/9] CPUFreq Updates & Fixes for 3.10 Rafael J. Wysocki
2013-04-02 0:43 ` Viresh Kumar
2013-04-02 12:51 ` Rafael J. Wysocki
2013-04-02 13:23 ` Viresh Kumar
2013-04-02 13:45 ` Rafael J. Wysocki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c8744f720d5fd8f3312be7d40ae93f36a85ddcad.1364820621.git.viresh.kumar@linaro.org \
--to=viresh.kumar@linaro.org \
--cc=cpufreq@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@sisk.pl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).