diff mbox

[RFC,v2,10/11] sched: delete sd ptr arg in arch_scale_freq_power()

Message ID 1390221588-20473-11-git-send-email-dietmar.eggemann@arm.com
State New
Headers show

Commit Message

Dietmar Eggemann Jan. 20, 2014, 12:39 p.m. UTC
From: Dietmar Eggemann <dietmar.eggemann@arm.com>

The ARM arch_scale_freq_power function is the only one outside the core
scheduler code using struct sched_domain.  This argument is not used in
the call chain.  This patch deletes it to make it possible to un-export
struct sched_domain.

Signed-off-by: Dietmar Eggemann <dietmar.eggemann@arm.com>
---
 arch/arm/kernel/topology.c |    4 ++--
 kernel/sched/fair.c        |   10 +++++-----
 2 files changed, 7 insertions(+), 7 deletions(-)
diff mbox

Patch

diff --git a/arch/arm/kernel/topology.c b/arch/arm/kernel/topology.c
index 85a87370f144..ae209ce7d78f 100644
--- a/arch/arm/kernel/topology.c
+++ b/arch/arm/kernel/topology.c
@@ -42,7 +42,7 @@ 
  */
 static DEFINE_PER_CPU(unsigned long, cpu_scale);
 
-unsigned long arch_scale_freq_power(struct sched_domain *sd, int cpu)
+unsigned long arch_scale_freq_power(int cpu)
 {
 	return per_cpu(cpu_scale, cpu);
 }
@@ -166,7 +166,7 @@  void update_cpu_power(unsigned int cpu)
 	set_power_scale(cpu, cpu_capacity(cpu) / middle_capacity);
 
 	printk(KERN_INFO "CPU%u: update cpu_power %lu\n",
-		cpu, arch_scale_freq_power(NULL, cpu));
+		cpu, arch_scale_freq_power(cpu));
 }
 
 #else
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index c7395d97e4cb..cb93cb09caf8 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -5257,14 +5257,14 @@  static inline int get_sd_load_idx(struct sched_domain *sd,
 	return load_idx;
 }
 
-static unsigned long default_scale_freq_power(struct sched_domain *sd, int cpu)
+static unsigned long default_scale_freq_power(int cpu)
 {
 	return SCHED_POWER_SCALE;
 }
 
-unsigned long __weak arch_scale_freq_power(struct sched_domain *sd, int cpu)
+unsigned long __weak arch_scale_freq_power(int cpu)
 {
-	return default_scale_freq_power(sd, cpu);
+	return default_scale_freq_power(cpu);
 }
 
 static unsigned long default_scale_smt_power(struct sched_domain *sd, int cpu)
@@ -5329,9 +5329,9 @@  static void update_cpu_power(struct sched_domain *sd, int cpu)
 	sdg->sgp->power_orig = power;
 
 	if (sched_feat(ARCH_POWER))
-		power *= arch_scale_freq_power(sd, cpu);
+		power *= arch_scale_freq_power(cpu);
 	else
-		power *= default_scale_freq_power(sd, cpu);
+		power *= default_scale_freq_power(cpu);
 
 	power >>= SCHED_POWER_SHIFT;