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:	Wed, 26 Mar 2008 12:23:11 +0100
From:	Ingo Molnar <mingo@...e.hu>
To:	Jörn Engel <joern@...fs.org>
Cc:	Andy Whitcroft <apw@...dowen.org>,
	David Miller <davem@...emloft.net>, jirislaby@...il.com,
	viro@...IV.linux.org.uk, joe@...ches.com, tglx@...utronix.de,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 109/148] include/asm-x86/serial.h: checkpatch cleanups
	- formatting only


* Jörn Engel <joern@...fs.org> wrote:

> > > (foo*) should be (foo *)
> > > 	What does that extra space gain us?
> > 
> > It really gains us nothing, however that is not really the point. 
> > The point is that consistancy is good, with the space is the more 
> > normal 'C' usage, without for 'C++'; something to do with the 
> > implication that (foo *) is a pointer to a foo (separate things), 
> > and (foo*) is a thing of type pointer to foo (one thing) which is 
> > more object oriented.
> > 
> > The "norm" is with and so it makes sense to maintain it that way.  A 
> > lot of the layout and style choises are arbitrary, and disliked by 
> > many of us, but we follow the style to maintain that common feel.
> 
> Then I'll happily ignore it.  Not having the space gains me one 
> column. It is absolutely minimal, sure.  But when the alternative is 
> based on pure whim...

you seem to be confused here. Consistency is not a 'whim', and it is 
often just about "arbitrary" choices that also have some ergonomic 
component as well (but sometimes not). The following form:

  if(x)
  {
          MyFunction1();
          MyFunction2();
  }

can be argued to be just as clean (and just as ergonomic) as:

  if (x) {
          my_function_1();
          my_function_2();
  }

if you use it consistently throughout the _whole_ codebase.

what does not make sense is to _mix_ different coding styles, especially 
within the same source code block - which you do in that specific file.

or is it your argument that consistent coding style is bad? That 
argument has been settled long ago with the creation of 
Documentation/CodingStyle. All kernel code is supposed to follow that 
style, unless the resulting line of code looks clearly _wrong_. Your 
arguments seem to center around "hey, my way it looks similarly good so 
i'll do that instead because i'm the maintainer" - and that argument 
does not fly. CodingStyle is definitely not gospel and common sense 
should be applied, but _arbitrarily_ and _intentionally_ deviating from 
it is considered bad manners and hurts Linux as a whole.

granted, especially in the driver space, where there's a lack of 
maintenance resources, all such secondary rules are weaker - because a 
somewhat quirky maintainer is still much better to Linux than no 
maintainer. But the closer you get to the core kernel, the higher the 
code quality stakes get, and the stricter (and the more consistent) 
these style requirements become as well.

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