The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Randy Dunlap <randy.dunlap@oracle.com>
To: Dave Jones <davej@codemonkey.org.uk>
Cc: mark.langsdorf@amd.com, lkml <linux-kernel@vger.kernel.org>,
	akpm <akpm@linux-foundation.org>
Subject: Re: [PATCH -next] powernow-k8: fix build errors
Date: Fri, 8 Aug 2008 10:50:40 -0700	[thread overview]
Message-ID: <20080808105040.291097a2.randy.dunlap@oracle.com> (raw)
In-Reply-To: <20080808173822.GP26295@codemonkey.org.uk>

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>");

  reply	other threads:[~2008-08-08 17:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2008-08-08 18:03     ` Dave Jones

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080808105040.291097a2.randy.dunlap@oracle.com \
    --to=randy.dunlap@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=davej@codemonkey.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.langsdorf@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox