powernow-k8: fix build errors
PATCH 1/1 powernow-k8: fix build errors
From: Randy Dunlap <[email protected]>
Fix build when CONFIG_X86_POWERNOW_K8_ACPI=n:
(seems that someone forgot to test this build combo) (fix 25 of 50 randconfig build errors)
linux-next-20080808/arch/x86/kernel/cpu/cpufreq/powernow-k8.c:1334: error: implicit declaration of function 'powernow_k8_cpu_preinit_acpi' linux-next-20080808/arch/x86/kernel/cpu/cpufreq/powernow-k8.c:1352: error: 'acpi_perf_data' undeclared (first use in this function)
--- arch/x86/kernel/cpu/cpufreq/powernow-k8.c | 4 ++++ 1 file changed, 4 insertions(+)
arch/x86/kernel/cpu/cpufreq/powernow-k8.c +4 -0
@@ -1331,7 +1331,9 @@ static int __cpuinit powernowk8_init(voi }if (supported_cpus ==num_online_cpus ()) { +#ifdef CONFIG_X86_POWERNOW_K8_ACPI powernow_k8_cpu_preinit_acpi (); +#endif printk(KERN_INFO PFX "Found %d %s ""processors (%d cpu cores) (" VERSION ")\n" , num_online_nodes(),
@@ -1349,7 +1351,9 @@ static void __exit powernowk8_exit(void)cpufreq_unregister_driver (&cpufreq_amd64_driver); +#ifdef CONFIG_X86_POWERNOW_K8_ACPI free_percpu (acpi_perf_data); +#endif }MODULE_AUTHOR ("Paul Devriendt <[email protected]> and Mark Langsdorf <[email protected]>" );
Quoted 6 lines
From: Randy Dunlap <[email protected]>
Fix build when
CONFIG_X86_POWERNOW_K8_ACPI=n:
(seems that someone forgot to test this build combo) (fix 25 of 50 randconfig build errors)
Quoted 7 lines
linux-next-20080808/arch/x86/kernel/cpu/cpufreq/powernow-k8.c:
1334: error: implicit declaration of function 'powernow_k8_cpu_preinit_acpi'linux-next-20080808/arch/x86/kernel/cpu/cpufreq/powernow-k8.c:
1352: error: 'acpi_perf_data' undeclared (first use in this function)Signed-off-by Randy Dunlap <[email protected]>
Ack, thanks.
-Mark Langsdorf
Operating System Research Center
AMD
Quoted 5 lines · Randy Dunlap
From: Randy Dunlap <[email protected]>
Fix build when
CONFIG_X86_POWERNOW_K8_ACPI=n:
(seems that someone forgot to test this build combo) (fix 25 of 50 randconfig build errors)
Yikes. I'll add that to my pre-push test script. (I currently only test allmodconfig/allyes/allno for all
the changed files within each patch)
Quoted 11 lines
linux-next-20080808/arch/x86/kernel/cpu/cpufreq/powernow-k8.c:1334: error: implicit declaration of function 'powernow_k8_cpu_preinit_acpi'linux-next-20080808/arch/x86/kernel/cpu/cpufreq/powernow-k8.c:1352: error: 'acpi_perf_data' undeclared (first use in this function)Signed-off-by Randy Dunlap <[email protected]>--- arch/x86/kernel/cpu/cpufreq/powernow-k8.c | 4 ++++ 1 file changed, 4 insertions(+)
arch/x86/kernel/cpu/cpufreq/powernow-k8.c static int __cpuinit powernowk8_init(voi · line 1336
Quoted 6 lines
arch/x86/kernel/cpu/cpufreq/powernow-k8.c +2
-0@@ -1331,7 +1331,9 @@ static int __cpuinit powernowk8_init(voi }if (supported_cpus ==num_online_cpus ()) { +#ifdef CONFIG_X86_POWERNOW_K8_ACPI powernow_k8_cpu_preinit_acpi (); +#endif
I think something like below may be better..
Same thing, but with one less ifdef ?
Dave
arch/x86/kernel/cpu/cpufreq/powernow-k8.c +3 -0
@@ -951,6 +951,7 @@ static void powernow_k8_cpu_exit_acpi(struct powernow_k8_data *data) }#else +static int powernow_k8_cpu_preinit_acpi (struct powernow_k8_data *data) {return -ENODEV ; }static int powernow_k8_cpu_init_acpi (struct powernow_k8_data *data) {return -ENODEV ; }static void powernow_k8_cpu_exit_acpi (struct powernow_k8_data *data) {return ; }static void powernow_k8_acpi_pst_values (struct powernow_k8_data *data,unsigned int index) {return ; }
@@ -1349,7 +1351,9 @@ static void __exit powernowk8_exit(void)dprintk ("exit\n" );cpufreq_unregister_driver (&cpufreq_amd64_driver); +#ifdef CONFIG_X86_POWERNOW_K8_ACPI free_percpu (acpi_perf_data); +#ifdef }
MODULE_AUTHOR("Paul Devriendt <[email protected]> and Mark Langsdorf <[email protected]>");
Signature · 1 line
http://www.codemonkey.org.uk
Quoted 2 lines · On Fri, 8 Aug 2008 13:38:22 -0400 Dave Jones wrote:
I think something like below may be better..
Same thing, but with one less ifdef ?
Close, but no cigar.
arch/x86/kernel/cpu/cpufreq/powernow-k8.c static void powernow_k8_cpu_exit_acpi(struct powernow_k8_data *data) · line 954
Quoted 9 lines
arch/x86/kernel/cpu/cpufreq/powernow-k8.c +1
-0@@ -951,6 +951,7 @@ static void powernow_k8_cpu_exit_acpi(struct powernow_k8_data *data) }#else +static int powernow_k8_cpu_preinit_acpi (struct powernow_k8_data *data) {return -ENODEV ; }
(void) // parameters
arch/x86/kernel/cpu/cpufreq/powernow-k8.c static void __exit powernowk8_exit(void) · line 1357
Quoted 11 lines
arch/x86/kernel/cpu/cpufreq/powernow-k8.c +2
-0static int powernow_k8_cpu_init_acpi (struct powernow_k8_data *data) {return -ENODEV ; }static void powernow_k8_cpu_exit_acpi (struct powernow_k8_data *data) {return ; }static void powernow_k8_acpi_pst_values (struct powernow_k8_data *data,unsigned int index) {return ; }@@ -1349,7 +1351,9 @@ static void __exit powernowk8_exit(void)dprintk ("exit\n" );cpufreq_unregister_driver (&cpufreq_amd64_driver); +#ifdef CONFIG_X86_POWERNOW_K8_ACPI free_percpu (acpi_perf_data); +#ifdef
#endif
Quoted 3 lines
arch/x86/kernel/cpu/cpufreq/powernow-k8.c +0
-0}
MODULE_AUTHOR("Paul Devriendt <[email protected]> and Mark Langsdorf <[email protected]>");
---
(your) new patch:
--- arch/x86/kernel/cpu/cpufreq/powernow-k8.c | 3 +++ 1 file changed, 3 insertions(+)
arch/x86/kernel/cpu/cpufreq/powernow-k8.c +3 -0
@@ -951,6 +951,7 @@ static void powernow_k8_cpu_exit_acpi(st }#else +static int powernow_k8_cpu_preinit_acpi (void ) {return -ENODEV ; }static int powernow_k8_cpu_init_acpi (struct powernow_k8_data *data) {return -ENODEV ; }static void powernow_k8_cpu_exit_acpi (struct powernow_k8_data *data) {return ; }static void powernow_k8_acpi_pst_values (struct powernow_k8_data *data,unsigned int index) {return ; }
@@ -1349,7 +1350,9 @@ static void __exit powernowk8_exit(void)cpufreq_unregister_driver (&cpufreq_amd64_driver); +#ifdef CONFIG_X86_POWERNOW_K8_ACPI free_percpu (acpi_perf_data); +#endif }MODULE_AUTHOR ("Paul Devriendt <[email protected]> and Mark Langsdorf <[email protected]>" );
Quoted 6 lines · Randy Dunlap
Quoted 2 lines · On Fri, 8 Aug 2008 13:38:22 -0400 Dave Jones wrote:
I think something like below may be better..
Same thing, but with one less ifdef ?Close, but no cigar.
Yeah, that's what you get for posting before building.
Quoted 10 lines
arch/x86/kernel/cpu/cpufreq/powernow-k8.c static void powernow_k8_cpu_exit_acpi(struct powernow_k8_data *data) · line 954
Quoted 9 lines
arch/x86/kernel/cpu/cpufreq/powernow-k8.c +1
-0@@ -951,6 +951,7 @@ static void powernow_k8_cpu_exit_acpi(struct powernow_k8_data *data) }#else +static int powernow_k8_cpu_preinit_acpi (struct powernow_k8_data *data) {return -ENODEV ; }(void) // parameters
I made the same change locally.
Quoted 1 line
(your) new patch:
I'll punt this on to Linus with your Signed-off-by: and Marks ACKed by.
thanks,
Dave
Signature · 1 line
http://www.codemonkey.org.uk