Re: [git pull] PCI pull request for 2.6.27

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux