linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Alistair John Strachan <alistair@devzero.co.uk>
Cc: "Maciej W. Rozycki" <macro@linux-mips.org>,
	Andy Whitcroft <apw@shadowen.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 12:31:36 -0700	[thread overview]
Message-ID: <20070712123136.8e0b8eda.akpm@linux-foundation.org> (raw)
In-Reply-To: <200707122015.12078.alistair@devzero.co.uk>

On Thu, 12 Jul 2007 20:15:11 +0100
Alistair John Strachan <alistair@devzero.co.uk> wrote:

> 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.

That, plus the first style leaves room for useful code comments.  The lack
of which is often a maintainability bug.

  reply	other threads:[~2007-07-12 19:31 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
2007-07-12 19:31       ` Andrew Morton [this message]
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=20070712123136.8e0b8eda.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=alistair@devzero.co.uk \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).