Re: [PATCH 109/148] include/asm-x86/serial.h: checkpatch cleanups- formatting only

From: Ingo Molnar
Date: Tue Mar 25 2008 - 09:46:27 EST



* Ingo Molnar <mingo@xxxxxxx> wrote:

> you picked an borderline case without showing the full effects of your
> choice of style - but still even in this example you are wrong i
> believe. [...]

and let me give an example with the your very own code that you wrote
and maintain, drivers/mtd/devices/block2mtd.c:

errors lines of code errors/KLOC
drivers/mtd/devices/block2mtd.c 10 490 20.4

that's pretty OK code, but not perfect, the 10 errors are:

ERROR: do not use C99 // comments
ERROR: need spaces around that '=' (ctx:VxV)
ERROR: need spaces around that '<' (ctx:VxV)
ERROR: do not use C99 // comments
ERROR: do not use C99 // comments
ERROR: do not use C99 // comments
ERROR: do not use C99 // comments
ERROR: do not use C99 // comments
ERROR: do not use C99 // comments
ERROR: do not initialise statics to 0 or NULL

so just because you disagreed with those 2 errors that relate to '=' and
'<' (and where accoding to CodingStyle checkpatch.pl is correct), you
disregarded the other 8 very valid complaints that checkpatch.pl had.
(the final one even negatively affects the size of the kernel)

and this is the experience i made in general: the checkpatch.pl benefits
far outweigh the costs, even if you disagree with a particular rule of
checkpatch.pl. When you came to Linux you already had to change your
coding style quite radically, correct?

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/