Linux Power Management development
 help / color / mirror / Atom feed
* [PATCH] cpufreq: Simplify cpufreq_can_do_remote_dvfs()
@ 2017-08-04 12:57 Rafael J. Wysocki
  2017-08-07  3:33 ` Viresh Kumar
  0 siblings, 1 reply; 2+ messages in thread
From: Rafael J. Wysocki @ 2017-08-04 12:57 UTC (permalink / raw)
  To: Linux PM; +Cc: LKML, Viresh Kumar

From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

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>
---

On top of the current linux-next.

---
 include/linux/cpufreq.h |    7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

Index: linux-pm/include/linux/cpufreq.h
===================================================================
--- linux-pm.orig/include/linux/cpufreq.h
+++ linux-pm/include/linux/cpufreq.h
@@ -578,11 +578,8 @@ static inline bool cpufreq_can_do_remote
 	 * - 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);
 }
 
 /*********************************************************************

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-08-07  3:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-04 12:57 [PATCH] cpufreq: Simplify cpufreq_can_do_remote_dvfs() Rafael J. Wysocki
2017-08-07  3:33 ` Viresh Kumar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox