Subject: Re: [PATCH] arch/ppc/kernel/idle.c: don't declare cpu variable in non-SMP kernels

From: Nathan Lynch <[email-masked]>
Date: Sat, 3 Dec 2005 14:00:27 -0500

> 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.