From: Alistair John Strachan <alistair@devzero.co.uk>
To: "Maciej W. Rozycki" <macro@linux-mips.org>
Cc: Andy Whitcroft <apw@shadowen.org>,
Andrew Morton <akpm@linux-foundation.org>,
Ralf Baechle <ralf@linux-mips.org>,
Mark Mason <mason@broadcom.com>,
Randy Dunlap <rdunlap@xenotime.net>,
Joel Schopp <jschopp@austin.ibm.com>,
linux-mips@linux-mips.org, linux-serial@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sb1250-duart.c: SB1250 DUART serial support
Date: Thu, 12 Jul 2007 20:15:11 +0100 [thread overview]
Message-ID: <200707122015.12078.alistair@devzero.co.uk> (raw)
In-Reply-To: <Pine.LNX.4.64N.0707121904211.3029@blysk.ds.pg.gda.pl>
On Thursday 12 July 2007 19:16:20 Maciej W. Rozycki wrote:
> On Thu, 12 Jul 2007, Andy Whitcroft wrote:
[snip]
> > WARNING: declaring multiple variables together should be avoided
> > #372: FILE: drivers/serial/sb1250-duart.c:246:
> > + unsigned int mctrl, status;
>
> Well, this is probably superfluous -- why would anyone prefer:
>
> int r0;
> int r1;
> int r2;
> int r3;
> int r4;
>
> to:
>
> int r0, r1, r2, r3, r4;
>
> unconditionally?
Imagine you're working on a piece of kernel code that has a lot of parallel
churn. Conflicts on lines like "int a,b,c,d;" are more likely to cause Andrew
et al pain, which I guess is the rationale for discouraging it. Conversely,
if the variables are kept separate, diff handles it fine.
I think as long as the variables are logically grouped, the pain is minimised,
but there's a few good reasons for the verbose style.
--
Cheers,
Alistair.
137/1 Warrender Park Road, Edinburgh, UK.
next prev parent reply other threads:[~2007-07-12 19:15 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-12 17:39 [PATCH] sb1250-duart.c: SB1250 DUART serial support Maciej W. Rozycki
2007-07-12 17:43 ` Ralf Baechle
2007-07-12 17:50 ` Andy Whitcroft
2007-07-12 18:16 ` Maciej W. Rozycki
2007-07-12 19:15 ` Alistair John Strachan [this message]
2007-07-12 19:31 ` Andrew Morton
2007-07-12 18:47 ` Andrew Morton
2007-07-12 20:14 ` Andrew Sharp
2007-07-13 9:41 ` Maciej W. Rozycki
2007-07-13 14:48 ` Ralf Baechle
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=200707122015.12078.alistair@devzero.co.uk \
--to=alistair@devzero.co.uk \
--cc=akpm@linux-foundation.org \
--cc=apw@shadowen.org \
--cc=jschopp@austin.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=linux-serial@vger.kernel.org \
--cc=macro@linux-mips.org \
--cc=mason@broadcom.com \
--cc=ralf@linux-mips.org \
--cc=rdunlap@xenotime.net \
/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.