All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] powernow-k8: fix build errors
@ 2008-08-08 17:19 Randy Dunlap
  2008-08-08 17:26 ` Langsdorf, Mark
  2008-08-08 17:38 ` Dave Jones
  0 siblings, 2 replies; 5+ messages in thread
From: Randy Dunlap @ 2008-08-08 17:19 UTC (permalink / raw)
  To: mark.langsdorf, lkml; +Cc: davej, akpm

From: Randy Dunlap <randy.dunlap@oracle.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)

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@oracle.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
 		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 <paul.devriendt@amd.com> and Mark Langsdorf <mark.langsdorf@amd.com>");

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

* RE: [PATCH -next] powernow-k8: fix build errors
  2008-08-08 17:19 [PATCH -next] powernow-k8: fix build errors Randy Dunlap
@ 2008-08-08 17:26 ` Langsdorf, Mark
  2008-08-08 17:38 ` Dave Jones
  1 sibling, 0 replies; 5+ messages in thread
From: Langsdorf, Mark @ 2008-08-08 17:26 UTC (permalink / raw)
  To: Randy Dunlap, lkml; +Cc: davej, akpm

> From: Randy Dunlap <randy.dunlap@oracle.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)
> 
> 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@oracle.com>

Ack, thanks.

-Mark Langsdorf
Operating System Research Center
AMD


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

* Re: [PATCH -next] powernow-k8: fix build errors
  2008-08-08 17:19 [PATCH -next] powernow-k8: fix build errors Randy Dunlap
  2008-08-08 17:26 ` Langsdorf, Mark
@ 2008-08-08 17:38 ` Dave Jones
  2008-08-08 17:50   ` Randy Dunlap
  1 sibling, 1 reply; 5+ messages in thread
From: Dave Jones @ 2008-08-08 17:38 UTC (permalink / raw)
  To: Randy Dunlap; +Cc: mark.langsdorf, lkml, akpm

On Fri, Aug 08, 2008 at 10:19:50AM -0700, Randy Dunlap wrote:
 > From: Randy Dunlap <randy.dunlap@oracle.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@oracle.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@amd.com> and Mark Langsdorf <mark.langsdorf@amd.com>");
-- 
http://www.codemonkey.org.uk

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

* Re: [PATCH -next] powernow-k8: fix build errors
  2008-08-08 17:38 ` Dave Jones
@ 2008-08-08 17:50   ` Randy Dunlap
  2008-08-08 18:03     ` Dave Jones
  0 siblings, 1 reply; 5+ messages in thread
From: Randy Dunlap @ 2008-08-08 17:50 UTC (permalink / raw)
  To: Dave Jones; +Cc: mark.langsdorf, lkml, akpm

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.

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

(void) // parameters

>  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

#endif

>  }
>  
>  MODULE_AUTHOR("Paul Devriendt <paul.devriendt@amd.com> and Mark Langsdorf <mark.langsdorf@amd.com>");


---
(your) new patch:
---
 arch/x86/kernel/cpu/cpufreq/powernow-k8.c |    3 +++
 1 file changed, 3 insertions(+)

--- linux-next-20080808.orig/arch/x86/kernel/cpu/cpufreq/powernow-k8.c
+++ linux-next-20080808/arch/x86/kernel/cpu/cpufreq/powernow-k8.c
@@ -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 <paul.devriendt@amd.com> and Mark Langsdorf <mark.langsdorf@amd.com>");

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

* Re: [PATCH -next] powernow-k8: fix build errors
  2008-08-08 17:50   ` Randy Dunlap
@ 2008-08-08 18:03     ` Dave Jones
  0 siblings, 0 replies; 5+ messages in thread
From: Dave Jones @ 2008-08-08 18:03 UTC (permalink / raw)
  To: Randy Dunlap; +Cc: mark.langsdorf, lkml, akpm

On Fri, Aug 08, 2008 at 10:50:40AM -0700, Randy Dunlap wrote:
 > 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.
 
 > > 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; }
 > (void) // parameters

I made the same change locally.
 
 > (your) new patch:

I'll punt this on to Linus with your Signed-off-by: and Marks ACKed by.

thanks,

	Dave
 
-- 
http://www.codemonkey.org.uk

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

end of thread, other threads:[~2008-08-08 18:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-08 17:19 [PATCH -next] powernow-k8: fix build errors Randy Dunlap
2008-08-08 17:26 ` Langsdorf, Mark
2008-08-08 17:38 ` Dave Jones
2008-08-08 17:50   ` Randy Dunlap
2008-08-08 18:03     ` Dave Jones

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.