Skip to content

Commit

Permalink
cpufreq: governors: Remove duplicate check of target freq in supporte…
Browse files Browse the repository at this point in the history
…d range

Function __cpufreq_driver_target() checks if target_freq is within
policy->min and policy->max range. generic_powersave_bias_target() also
checks if target_freq is valid via a cpufreq_frequency_table_target()
call. So, drop the unnecessary duplicate check in *_check_cpu().

Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
Stratos Karafotis authored and Rafael J. Wysocki committed Aug 28, 2013
1 parent 3617f2c commit 934dac1
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 7 deletions.
4 changes: 0 additions & 4 deletions drivers/cpufreq/cpufreq_conservative.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,6 @@ static void cs_check_cpu(int cpu, unsigned int load)
return;

dbs_info->requested_freq += get_freq_target(cs_tuners, policy);
if (dbs_info->requested_freq > policy->max)
dbs_info->requested_freq = policy->max;

__cpufreq_driver_target(policy, dbs_info->requested_freq,
CPUFREQ_RELATION_H);
Expand All @@ -89,8 +87,6 @@ static void cs_check_cpu(int cpu, unsigned int load)
return;

dbs_info->requested_freq -= get_freq_target(cs_tuners, policy);
if (dbs_info->requested_freq < policy->min)
dbs_info->requested_freq = policy->min;

__cpufreq_driver_target(policy, dbs_info->requested_freq,
CPUFREQ_RELATION_L);
Expand Down
3 changes: 0 additions & 3 deletions drivers/cpufreq/cpufreq_ondemand.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,6 @@ static void od_check_cpu(int cpu, unsigned int load)
/* No longer fully busy, reset rate_mult */
dbs_info->rate_mult = 1;

if (freq_next < policy->min)
freq_next = policy->min;

if (!od_tuners->powersave_bias) {
__cpufreq_driver_target(policy, freq_next,
CPUFREQ_RELATION_L);
Expand Down

0 comments on commit 934dac1

Please sign in to comment.