From: "Steven J. Magnani" <steve@digidescorp.com>
To: monstr@monstr.eu
Cc: microblaze-uclinux@itee.uq.edu.au, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] microblaze: add stack unwinder
Date: Mon, 26 Apr 2010 22:31:29 -0500 [thread overview]
Message-ID: <1272339089.17476.1.camel@iscandar.digidescorp.com> (raw)
In-Reply-To: <4BC5F11C.3080305@monstr.eu>
On Wed, 2010-04-14 at 18:45 +0200, Michal Simek wrote:
> > diff -uprN a/arch/microblaze/kernel/traps.c
> b/arch/microblaze/kernel/traps.c
> > --- a/arch/microblaze/kernel/traps.c 2010-04-09 21:52:36.000000000
> > +++ b/arch/microblaze/kernel/traps.c 2010-04-12 22:16:01.000000000
[snip]
> >
> > - if (!stack)
> > - stack = (unsigned long *)&stack;
> > + if (fp == 0) {
> > + if (task)
> > + fp = ((struct thread_info *)
> > + (task->stack))->cpu_context.r1;
> > + else {
> > + /* Pick up caller of dump_stack() */
> > + fp = (__u32)&sp - 8;
> > + }
> > + }
>
> just coding style.
>
> if (fp == 0)
> if (task)
> fp = ((struct thread_info *)
> (task->stack))->cpu_context.r1;
> else
> /* Pick up caller of dump_stack() */
> fp = (__u32)&sp - 8;
Do you feel strongly about this? I try to always use braces on if/else
clauses that have more than one line. I've found that the extra
characters are well worth the savings in debugging time when someone
tries to extend the clause and forgets to add the braces.
Steve
next prev parent reply other threads:[~2010-04-27 3:51 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-14 4:55 Steven J. Magnani
2010-04-14 6:34 ` Michal Simek
2010-04-14 16:45 ` Michal Simek
2010-04-27 3:31 ` Steven J. Magnani [this message]
2010-04-27 7:54 ` Michal Simek
2010-04-16 8:32 ` Michal Simek
2010-04-16 14:33 ` [microblaze-uclinux] " Steven J. Magnani
2010-04-16 15:03 ` Michal Simek
2010-04-26 15:34 ` Michal Simek
2010-04-27 3:36 ` Steven J. Magnani
2010-04-27 7:57 ` Michal Simek
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=1272339089.17476.1.camel@iscandar.digidescorp.com \
--to=steve@digidescorp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=microblaze-uclinux@itee.uq.edu.au \
--cc=monstr@monstr.eu \
/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
Powered by JetHome