intel_pstate: Simplify conditional in intel_pstate_set_policy()
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 11 May 2016 22:46:45 +0000 (00:46 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 18 May 2016 00:26:33 +0000 (02:26 +0200)
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>
drivers/cpufreq/intel_pstate.c

index b76a98dd9988b4f553ddbdd47b663f8720e5fc89..3a9c4325d6e224a55b0aa334476b5cc99529f3c9 100644 (file)
@@ -1461,12 +1461,11 @@ static int intel_pstate_set_policy(struct cpufreq_policy *policy)
        intel_pstate_clear_update_util_hook(policy->cpu);
 
        cpu = all_cpu_data[0];
-       if (cpu->pstate.max_pstate_physical > cpu->pstate.max_pstate) {
-               if (policy->max < policy->cpuinfo.max_freq &&
-                   policy->max > cpu->pstate.max_pstate * cpu->pstate.scaling) {
-                       pr_debug("policy->max > max non turbo frequency\n");
-                       policy->max = policy->cpuinfo.max_freq;
-               }
+       if (cpu->pstate.max_pstate_physical > cpu->pstate.max_pstate &&
+           policy->max < policy->cpuinfo.max_freq &&
+           policy->max > cpu->pstate.max_pstate * cpu->pstate.scaling) {
+               pr_debug("policy->max > max non turbo frequency\n");
+               policy->max = policy->cpuinfo.max_freq;
        }
 
        if (policy->policy == CPUFREQ_POLICY_PERFORMANCE) {