lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 8 Aug 2008 13:38:22 -0400
From:	Dave Jones <davej@...emonkey.org.uk>
To:	Randy Dunlap <randy.dunlap@...cle.com>
Cc:	mark.langsdorf@....com, lkml <linux-kernel@...r.kernel.org>,
	akpm <akpm@...ux-foundation.org>
Subject: Re: [PATCH -next] powernow-k8: fix build errors

On Fri, Aug 08, 2008 at 10:19:50AM -0700, Randy Dunlap wrote:
 > From: Randy Dunlap <randy.dunlap@...cle.com>
 > 
 > 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)

 > 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 <randy.dunlap@...cle.com>
 > ---
 >  arch/x86/kernel/cpu/cpufreq/powernow-k8.c |    4 ++++
 >  1 file changed, 4 insertions(+)
 > 
 > --- linux-next-20080808.orig/arch/x86/kernel/cpu/cpufreq/powernow-k8.c
 > +++ linux-next-20080808/arch/x86/kernel/cpu/cpufreq/powernow-k8.c
 > @@ -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

diff --git a/arch/x86/kernel/cpu/cpufreq/powernow-k8.c b/arch/x86/kernel/cpu/cpufreq/powernow-k8.c
index 7a09ba4..3ba6fd2 100644
--- a/arch/x86/kernel/cpu/cpufreq/powernow-k8.c
+++ b/arch/x86/kernel/cpu/cpufreq/powernow-k8.c
@@ -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 <paul.devriendt@....com> and Mark Langsdorf <mark.langsdorf@....com>");
-- 
http://www.codemonkey.org.uk
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ