[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <471EC3FE.8060907@goop.org>
Date: Tue, 23 Oct 2007 21:03:10 -0700
From: Jeremy Fitzhardinge <jeremy@...p.org>
To: Jeff Garzik <jeff@...zik.org>
CC: LKML <linux-kernel@...r.kernel.org>, akpm@...ux-foundation.org,
tglx@...utronix.de
Subject: Re: [PATCH 1/12] X86: fix !CONFIG_SMP warning in processor.c
Jeff Garzik wrote:
> Fix !CONFIG_SMP warning:
>
> arch/x86/kernel/acpi/processor.c: In function ‘arch_acpi_processor_init_pdc’:
> arch/x86/kernel/acpi/processor.c:65: warning: unused variable ‘cpu’
>
> Signed-off-by: Jeff Garzik <jgarzik@...hat.com>
> ---
> Ideally this warning should be hidden inside a wrapper or somesuch, to
> camouflage the unneeded argument in !SMP case.
>
> diff --git a/arch/x86/kernel/acpi/processor.c b/arch/x86/kernel/acpi/processor.c
> index 2ed0a4c..45e262a 100644
> --- a/arch/x86/kernel/acpi/processor.c
> +++ b/arch/x86/kernel/acpi/processor.c
> @@ -62,7 +62,9 @@ static void init_intel_pdc(struct acpi_processor *pr, struct cpuinfo_x86 *c)
> /* Initialize _PDC data based on the CPU vendor */
> void arch_acpi_processor_init_pdc(struct acpi_processor *pr)
> {
> +#ifdef CONFIG_SMP
> unsigned int cpu = pr->id;
> +#endif
> struct cpuinfo_x86 *c = &cpu_data(cpu);
>
Surely just replace cpu with pr->id? That's the only use.
J
-
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