All of lore.kernel.org
 help / color / mirror / Atom feed
From: Valdis.Kletnieks@vt.edu
To: Jesper Juhl <jj@chaosbits.net>
Cc: Rakib Mullick <rakib.mullick@gmail.com>,
	Ingo Molnar <mingo@elte.hu>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	LKML <linux-kernel@vger.kernel.org>,
	x86@kernel.org
Subject: Re: [PATCH] x86, dumpstack: Fix unused variable warning.
Date: Wed, 24 Nov 2010 23:07:47 -0500	[thread overview]
Message-ID: <25439.1290658067@localhost> (raw)
In-Reply-To: Your message of "Wed, 24 Nov 2010 10:57:10 +0100." <alpine.LNX.2.00.1011241051370.23994@swampdragon.chaosbits.net>

[-- Attachment #1: Type: text/plain, Size: 1016 bytes --]

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?

[-- Attachment #2: Type: application/pgp-signature, Size: 227 bytes --]

  parent reply	other threads:[~2010-11-25  4:09 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 [this message]
2010-11-25  6:30     ` Frederic Weisbecker
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=25439.1290658067@localhost \
    --to=valdis.kletnieks@vt.edu \
    --cc=fweisbec@gmail.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.