From: Ingo Molnar <mingo@elte.hu>
To: Jan Beulich <JBeulich@novell.com>,
Andrew Morton <akpm@linux-foundation.org>
Cc: tony.luck@intel.com, tglx@linutronix.de,
akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
hpa@zytor.com
Subject: Re: [PATCH 2/3] x86-64: use relative 32-bit pointers in exception tables
Date: Fri, 18 Feb 2011 09:14:46 +0100 [thread overview]
Message-ID: <20110218081446.GA21125@elte.hu> (raw)
In-Reply-To: <4D5E36DD02000078000329CE@vpn.id2.novell.com>
* Jan Beulich <JBeulich@novell.com> wrote:
> >>> On 17.02.11 at 18:25, Ingo Molnar <mingo@elte.hu> wrote:
>
> > Nice patch. I've got a really small code readability nitpick:
> >
> >> +#ifndef ex_insn /* until all architectures have this accessor */
> >> +#define ex_insn(x) (x)->insn
> >> +#endif
> >
> >> +#else
> >> +#define swap_ex NULL
> >> +#endif
> >
> > In the x86 architecture we tend to write this as:
> >
> >> +#else
> >> +# define swap_ex NULL
> >> +#endif
> >
> > So that the conditional structure stands out more, visually. (There might be
> > more
> > such cases in these patches as well.)
>
> I can certainly fix this, but got a comment from (I think) Andrew
> Morton to do exactly the opposite quite some time ago, with the
> rationale that this indentation leads to more involved patches
> when further conditionals get added around them.
Well, the patch impact argument is a valid concern, but by that logic we should also
drop the visual structure of other conditionals such as:
if (x) {
if (y)
z;
else
k;
} else {
l;
}
and write:
if (x) {
if (y)
z;
else
k;
} else {
l;
}
? I don't think so.
There might be other cases where marking CPP code this way looks ugly but in this
patch it's clearly helpful to readability.
So i think for consistency's (and eyeball health's) sake lets bring as much
meaningful geometric structure into source code as possible. Future patch size
worries are secondary IMO.
Thanks,
Ingo
next prev parent reply other threads:[~2011-02-18 8:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-17 17:03 [PATCH 2/3] x86-64: use relative 32-bit pointers in exception tables Jan Beulich
2011-02-17 17:25 ` Ingo Molnar
2011-02-18 8:07 ` Jan Beulich
2011-02-18 8:14 ` Ingo Molnar [this message]
2011-02-18 4:49 ` H. Peter Anvin
2011-02-18 9:34 ` Jan Beulich
2011-02-18 10:32 ` Jan Beulich
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=20110218081446.GA21125@elte.hu \
--to=mingo@elte.hu \
--cc=JBeulich@novell.com \
--cc=akpm@linux-foundation.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=tony.luck@intel.com \
/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