Re: [PATCH 1/1] checkpatch.pl: thou shalt not use () or (...) infunction declarations

From: Joe Perches
Date: Thu Mar 22 2012 - 15:00:29 EST


On Thu, 2012-03-22 at 13:17 -0400, Valdis.Kletnieks@xxxxxx wrote:
> Those can be 'int foo(void)' can't they? The other historical usage is for
> 'int foo()' to denote an old K&R-style varargs list, which is like disco - a
> bad idea from long agon that's never coming back. ;)
>
> Of course, if we add this to checkpatch, we'll have a flood of fixup patches.

Not really, more like a mist than a flood.
There just aren't many in-kernel uses.
There are 10 in drivers/, 15 in arch/, none in include/

$ grep -rP --include=*.[ch] "^\w+\s+\w+\s*\(\s*(?:\.\.\.){0,1}\s*\)" *

A single trivial patch should work for all of them.

> Maybe we just need to say "3.5 will be the int foo() housecleaning release" and
> be done with it?

Sensible.

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