lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 12 Jul 2007 12:31:36 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Alistair John Strachan <alistair@...zero.co.uk>
Cc:	"Maciej W. Rozycki" <macro@...ux-mips.org>,
	Andy Whitcroft <apw@...dowen.org>,
	Ralf Baechle <ralf@...ux-mips.org>,
	Mark Mason <mason@...adcom.com>,
	Randy Dunlap <rdunlap@...otime.net>,
	Joel Schopp <jschopp@...tin.ibm.com>,
	linux-mips@...ux-mips.org, linux-serial@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] sb1250-duart.c: SB1250 DUART serial support

On Thu, 12 Jul 2007 20:15:11 +0100
Alistair John Strachan <alistair@...zero.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.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ