public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Frederic Weisbecker <fweisbec@gmail.com>
To: Valdis.Kletnieks@vt.edu
Cc: Jesper Juhl <jj@chaosbits.net>,
	Rakib Mullick <rakib.mullick@gmail.com>,
	Ingo Molnar <mingo@elte.hu>, LKML <linux-kernel@vger.kernel.org>,
	x86@kernel.org
Subject: Re: [PATCH] x86, dumpstack: Fix unused variable warning.
Date: Thu, 25 Nov 2010 07:30:29 +0100	[thread overview]
Message-ID: <20101125073029.6ede17db@nowhere> (raw)
In-Reply-To: <25439.1290658067@localhost>

Le Wed, 24 Nov 2010 23:07:47 -0500,
Valdis.Kletnieks@vt.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.

  reply	other threads:[~2010-11-25  6:30 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-24  9:19 [PATCH] x86, dumpstack: Fix unused variable warning Rakib Mullick
2010-11-24  9:57 ` Jesper Juhl
2010-11-24 10:26   ` Rakib Mullick
2010-11-24 13:01     ` Frederic Weisbecker
2010-11-24 13:53       ` Jesper Juhl
2010-11-25  5:36       ` Rakib Mullick
2010-11-25  4:07   ` Valdis.Kletnieks
2010-11-25  6:30     ` Frederic Weisbecker [this message]
2010-11-24 13:19 ` Frederic Weisbecker
2010-11-25  5:35   ` Rakib Mullick
2010-11-25  6:32     ` Frederic Weisbecker
2011-01-08 12:06     ` [tip:perf/urgent] " tip-bot for Rakib Mullick

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20101125073029.6ede17db@nowhere \
    --to=fweisbec@gmail.com \
    --cc=Valdis.Kletnieks@vt.edu \
    --cc=jj@chaosbits.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rakib.mullick@gmail.com \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox