[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20101125073029.6ede17db@nowhere>
Date: Thu, 25 Nov 2010 07:30:29 +0100
From: Frederic Weisbecker <fweisbec@...il.com>
To: Valdis.Kletnieks@...edu
Cc: Jesper Juhl <jj@...osbits.net>,
Rakib Mullick <rakib.mullick@...il.com>,
Ingo Molnar <mingo@...e.hu>,
LKML <linux-kernel@...r.kernel.org>, x86@...nel.org
Subject: Re: [PATCH] x86, dumpstack: Fix unused variable warning.
Le Wed, 24 Nov 2010 23:07:47 -0500,
Valdis.Kletnieks@...edu a écrit :
> On Wed, 24 Nov 2010 10:57:10 +0100, Jesper Juhl said:
>
> > On Wed, 24 Nov 2010, Rakib Mullick wrote:
>
> > > 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.
>
> OK, I'll bite. Why does the original say 'unsigned long bp = 0;' and
> then turns around and has an 'if (!bp)' check? Why is the
> conditional there?
The original check was indeed not necessary. But now the whole block
should be removed anyway.
--
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