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]
Message-ID: <alpine.LFD.1.10.0807161732510.2835@woody.linux-foundation.org>
Date:	Wed, 16 Jul 2008 17:38:11 -0700 (PDT)
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	"Maciej W. Rozycki" <macro@...ux-mips.org>
cc:	Jesse Barnes <jbarnes@...tuousgeek.org>,
	linux-kernel@...r.kernel.org,
	"linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>
Subject: Re: [git pull] PCI pull request for 2.6.27



On Thu, 17 Jul 2008, Maciej W. Rozycki wrote:
> 
>  Conveniently "for" is short enough for indentation like this:
> 
> 	for (addr = (u8 *) __va(0xf0000);
> 	     addr < (u8 *) __va(0x100000);
> 	     addr += 16) {
>                 rt = pirq_check_routing_table(addr);

I don't actually like that one very much either.

It's perfectly readable when looking at things closely, but it's not very 
nice when quickly "scanning" code visually. It looks like two separate 
indents.

Btw, that "code scanning" is not necessarily a bad idea. It's actually 
pretty interesting to print code out in a 2-point font (or just open a 
terminal and do "ctrl -" several times to make the code basically 
unreadable). See if the code flow makes sense from 10,000 feet - you can 
pick up overlong functions and various other dubious practices really 
clearly (#ifdef's in code etc).

(IOW, the whole point of the exercise is to _not_ be able to actually read 
the code, but just look at the _shape_ of it).

Btw, that commit also did things like change the coding style to a 
non-kernel coding style by changing

	static int function(xyz..)

to

	static int
	function(xyz..)

just to make lines shorter. Again - introducing bigger problems than it 
actually fixes.

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