cpufreq: unbreak build for !CONFIG_SMP
PATCH 1/1 cpufreq: unbreak build for !CONFIG_SMP
'managed_policy' is used for the non-smp case in line 941.
Remove #ifdef CONFIG_SMP for its declaration in order to make cpufreq.c build on systems with CONFIG_SMP=n.
--- drivers/cpufreq/cpufreq.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-)
drivers/cpufreq/cpufreq.c +0 -2
@@ -776,9 +776,7 @@ static int cpufreq_add_dev(struct sys_device *sys_dev)struct sys_device *cpu_sys_dev;unsigned long flags;unsigned int j; -#ifdef CONFIG_SMP struct cpufreq_policy *managed_policy; -#endif if (cpu_is_offline (cpu))return 0 ;
Signature · 1 line
1.6.3.1
PATCH 1/1 cpufreq: Unbreak build for !SMP: symlinked cpus cannot happen for !SMP
Or like that:
Either all #ifdef CONFIG_SMP related conditionals to managed cpus should vanish or all should be covered. This one takes the latter approach.
---
'managed_policy' is used for the non-smp case in line 941.
Make the symlink code conditional to #ifdef CONFIG_SMP as already done at other places.
drivers/cpufreq/cpufreq.c +2 -0
@@ -930,6 +930,7 @@ static int cpufreq_add_dev(struct sys_de }spin_unlock_irqrestore (&cpufreq_driver_lock, flags); +#ifdef CONFIG_SMP /* symlink affected CPUs */ for_each_cpu (j, policy->cpus) {if (j == cpu)
@@ -947,6 +948,7 @@ static int cpufreq_add_dev(struct sys_de goto err_out_unregister; } } +#endif policy->governor =NULL ;/* to assure that the starting sequence is * run in cpufreq_set_policy */
Re: [PATCH] cpufreq: Unbreak build for !SMP: symlinked cpus cannot happen for !SMP
Quoted 4 lines · Thomas Renninger
Or like that:
Either all #ifdefCONFIG_SMPrelated conditionals to managed cpus should vanish or all should be covered. This one takes the latter approach.
Dave Jones fixed it already, see
Daniel
Quoted 29 lines
---
'managed_policy' is used for the non-smp case in line 941.Make the symlink code conditional to #ifdef
CONFIG_SMPas already done at other places.Signed-off-by Thomas Renninger <[email protected]>Index:
cpufreq/drivers/cpufreq/cpufreq.c
===================================================================drivers/cpufreq/cpufreq.c +2
-0@@ -930,6 +930,7 @@ static int cpufreq_add_dev(struct sys_de }spin_unlock_irqrestore (&cpufreq_driver_lock, flags); +#ifdef CONFIG_SMP /* symlink affected CPUs */ for_each_cpu (j, policy->cpus) {if (j == cpu)@@ -947,6 +948,7 @@ static int cpufreq_add_dev(struct sys_de goto err_out_unregister; } } +#endif policy->governor =NULL ;/* to assure that the starting sequence is * run in cpufreq_set_policy */