Commit c749c64f authored by Rafael J. Wysocki's avatar Rafael J. Wysocki

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: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: default avatarSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
parent 1aa7a6e2
...@@ -1461,13 +1461,12 @@ static int intel_pstate_set_policy(struct cpufreq_policy *policy) ...@@ -1461,13 +1461,12 @@ static int intel_pstate_set_policy(struct cpufreq_policy *policy)
intel_pstate_clear_update_util_hook(policy->cpu); intel_pstate_clear_update_util_hook(policy->cpu);
cpu = all_cpu_data[0]; cpu = all_cpu_data[0];
if (cpu->pstate.max_pstate_physical > cpu->pstate.max_pstate) { if (cpu->pstate.max_pstate_physical > cpu->pstate.max_pstate &&
if (policy->max < policy->cpuinfo.max_freq && policy->max < policy->cpuinfo.max_freq &&
policy->max > cpu->pstate.max_pstate * cpu->pstate.scaling) { policy->max > cpu->pstate.max_pstate * cpu->pstate.scaling) {
pr_debug("policy->max > max non turbo frequency\n"); pr_debug("policy->max > max non turbo frequency\n");
policy->max = policy->cpuinfo.max_freq; policy->max = policy->cpuinfo.max_freq;
} }
}
if (policy->policy == CPUFREQ_POLICY_PERFORMANCE) { if (policy->policy == CPUFREQ_POLICY_PERFORMANCE) {
limits = &performance_limits; limits = &performance_limits;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment