aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-05-11 18:46:45 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-05-17 20:26:33 -0400
commitc749c64f45fa07d20e11af2e3f3caa9d7650d341 (patch)
tree30f717d86c06418d3f381329e21ecdd0d0f03e2d
parent1aa7a6e2b8105f22a5f7d6def281f776459c95ba (diff)
intel_pstate: Simplify conditional in intel_pstate_set_policy()
One of the if () statements in intel_pstate_set_policy() causes another if () to be evaluated if the condition is true and it doesn't do anything else, so merge the two if () statements into one. No functional changes. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
-rw-r--r--drivers/cpufreq/intel_pstate.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
index b76a98dd9988..3a9c4325d6e2 100644
--- a/drivers/cpufreq/intel_pstate.c
+++ b/drivers/cpufreq/intel_pstate.c
@@ -1461,12 +1461,11 @@ static int intel_pstate_set_policy(struct cpufreq_policy *policy)
1461 intel_pstate_clear_update_util_hook(policy->cpu); 1461 intel_pstate_clear_update_util_hook(policy->cpu);
1462 1462
1463 cpu = all_cpu_data[0]; 1463 cpu = all_cpu_data[0];
1464 if (cpu->pstate.max_pstate_physical > cpu->pstate.max_pstate) { 1464 if (cpu->pstate.max_pstate_physical > cpu->pstate.max_pstate &&
1465 if (policy->max < policy->cpuinfo.max_freq && 1465 policy->max < policy->cpuinfo.max_freq &&
1466 policy->max > cpu->pstate.max_pstate * cpu->pstate.scaling) { 1466 policy->max > cpu->pstate.max_pstate * cpu->pstate.scaling) {
1467 pr_debug("policy->max > max non turbo frequency\n"); 1467 pr_debug("policy->max > max non turbo frequency\n");
1468 policy->max = policy->cpuinfo.max_freq; 1468 policy->max = policy->cpuinfo.max_freq;
1469 }
1470 } 1469 }
1471 1470
1472 if (policy->policy == CPUFREQ_POLICY_PERFORMANCE) { 1471 if (policy->policy == CPUFREQ_POLICY_PERFORMANCE) {