[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LNX.2.00.1011241051370.23994@swampdragon.chaosbits.net>
Date: Wed, 24 Nov 2010 10:57:10 +0100 (CET)
From: Jesper Juhl <jj@...osbits.net>
To: Rakib Mullick <rakib.mullick@...il.com>
cc: Ingo Molnar <mingo@...e.hu>,
Frederic Weisbecker <fweisbec@...il.com>,
LKML <linux-kernel@...r.kernel.org>, x86@...nel.org
Subject: Re: [PATCH] x86, dumpstack: Fix unused variable warning.
On Wed, 24 Nov 2010, Rakib Mullick wrote:
> With allnoconfig, bp becomes unused. So put bp into defination of
> CONFIG_FRAME_POINTER.
>
> arch/x86/kernel/dumpstack.c: In function ‘dump_stack’:
> arch/x86/kernel/dumpstack.c:200: warning: unused variable ‘bp’
>
> Signed-off-by: Rakib Mullick <rakib.mullick@...il.com>
> ---
>
> diff --git a/arch/x86/kernel/dumpstack.c b/arch/x86/kernel/dumpstack.c
> index 8474c99..fc5a253 100644
> --- a/arch/x86/kernel/dumpstack.c
> +++ b/arch/x86/kernel/dumpstack.c
> @@ -197,10 +197,10 @@ void show_stack(struct task_struct *task,
> unsigned long *sp)
> */
> void dump_stack(void)
> {
> - unsigned long bp = 0;
> unsigned long stack;
>
> #ifdef CONFIG_FRAME_POINTER
> + unsigned long bp = 0;
> if (!bp)
> get_bp(bp);
> #endif
So, now the bp variable does not exist at all if CONFIG_FRAME_POINTER is
not defined.
That's going to make this line :
show_trace(NULL, NULL, &stack, bp);
found further down in the dump_stack() function, quite unhappy.
--
Jesper Juhl <jj@...osbits.net> http://www.chaosbits.net/
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please.
Powered by blists - more mailing lists