cpufreq: Simplify cpufreq_can_do_remote_dvfs()
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 4 Aug 2017 12:57:39 +0000 (14:57 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 8 Aug 2017 15:09:02 +0000 (17:09 +0200)
The if () in cpufreq_can_do_remote_dvfs() is superfluous, so drop
it and simply return the value of the expression under it.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
include/linux/cpufreq.h

index 1981a4a167cebe7d9085eb3807a647112e23e240..d69464139f67ebca3f693f4b5c41c6ea6783e635 100644 (file)
@@ -578,11 +578,8 @@ static inline bool cpufreq_can_do_remote_dvfs(struct cpufreq_policy *policy)
         * - dvfs_possible_from_any_cpu flag is set
         * - the local and remote CPUs share cpufreq policy
         */
-       if (policy->dvfs_possible_from_any_cpu ||
-           cpumask_test_cpu(smp_processor_id(), policy->cpus))
-               return true;
-
-       return false;
+       return policy->dvfs_possible_from_any_cpu ||
+               cpumask_test_cpu(smp_processor_id(), policy->cpus);
 }
 
 /*********************************************************************