lkml.org 
[lkml]   [2008]   [Jul]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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


\
 
 \ /
  Last update: 2008-07-17 02:41    [W:0.033 / U:1.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site