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

From: Valdis . Kletnieks
Date: Thu Mar 22 2012 - 13:18:15 EST


On Thu, 22 Mar 2012 17:55:38 +0100, Jiri Slaby said:
> On 03/22/2012 05:49 PM, Valdis.Kletnieks@xxxxxx wrote:
> > Is there any *legitimate* use of an empty parameter list in the
> > kernel tree?
>
> Yeah, a ton of them. There are many drivers which work with a global
> singleton. So they need no argument.

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.
Maybe we just need to say "3.5 will be the int foo() housecleaning release" and
be done with it?

Attachment: pgp00000.pgp
Description: PGP signature