[PATCH] arch/ppc/kernel/idle.c: don't declare cpu variable in non-SMP kernels
Nathan Lynch
ntl at pobox.com
Sun Dec 4 06:00:27 EST 2005
> diff --git a/arch/ppc/kernel/idle.c b/arch/ppc/kernel/idle.c
> index 821a75e..b23a979 100644
> --- a/arch/ppc/kernel/idle.c
> +++ b/arch/ppc/kernel/idle.c
> @@ -37,7 +37,9 @@
> void default_idle(void)
> {
> void (*powersave)(void);
> +#ifdef CONFIG_SMP
> int cpu = smp_processor_id();
> +#endif
Better to just move the declaration of cpu down to the ifdef'd else
block further down in the function as that's the only place it is
used.
More information about the Linuxppc-dev
mailing list