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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 16 Apr 2012 22:26:54 +0200
From:	Ingo Molnar <mingo@...nel.org>
To:	David Miller <davem@...emloft.net>
Cc:	joe@...ches.com, linux-kernel@...r.kernel.org,
	akpm@...ux-foundation.org, torvalds@...ux-foundation.org,
	apw@...onical.com
Subject: Re: Please fix or revert: [PATCH] checkpatch: add --strict tests for
 braces, comments and casts


* David Miller <davem@...emloft.net> wrote:

> From: Ingo Molnar <mingo@...nel.org>
> Date: Mon, 16 Apr 2012 11:17:20 +0200
> 
> > 
> > This recent checkpatch commit, added in v3.4-rc1:
> > 
> >   aad4f6149831 checkpatch: add --strict tests for braces, comments and casts
> > 
> > made the default checkpatch run complain about the following 
> > perfectly fine multi-line comment block:
> > 
> > +               rdp->qlen_lazy = 0;
> > +               rdp->qlen = 0;
> > +
> > +               /*
> > +                * Adopt all callbacks.  The outgoing CPU was in no shape
> > +                * to advance them, so make them all go through a full
> > +                * grace period.
> > +                */
> > +               *receive_rdp->nxttail[RCU_NEXT_TAIL] = rdp->nxtlist;
> > 
> 
> I would like to formally propose that we change CodingStyle so that
> our comments are of the form:
> 
> 	/* XXX
> 	 * YYY
> 	 */
> 
> So that we can save one line of vertical space.
> 
> We've adopted this all across the networking, and the code 
> looks a lot nicer as well as allowing more actual code onto a 
> single window of text.

Sigh, this is sad for two reasons:

 1) It's butt ugly and it violates every basic principle of
    typography. Saving a line is often counter-productive, a 
    well placed whitespace (vertical or horizontal) will often 
    increase readability. Key is good balance.

    If you don't "see" it as ugly it's simply because your brain
    is not wired up to see 3D/2D geometry as a significant
    source of information. A significant portion (I'd 
    guesstimate a narrow majority) of kernel hackers *does* see
    2D/3D layout details in code and finds inconsistencies in 
    them counterproductive.

    ( It's roughly the same distinction that makes some people
      love the typographic layout of the iPhone/iPad while 
      others consider it unnecessary bling. )

 2) Even if it was proper typography (which it isnt), we have
    Documentation/CodingStyle for damn good reasons: so that
    people see a uniform style of code across the kernel. The 
    taste set out there is sometimes arbitrary in its details, 
    but one thing is certainly worse than arbitrary style rules:
    *random*, inconsistent rules, because that only adds noise.

Thanks,

	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