Re: [PATCH] headers_check.pl: disallow extern's

Arjan van de Ven
2009-01-03T00:04:03Z

On Sat, 3 Jan 2009 00:59:18 +0100
Arnd Bergmann <arnd@arndb.de> wrote:

> On Wednesday 31 December 2008, Mike Frysinger wrote:
> > On Wednesday 31 December 2008 11:58:03 Arnd Bergmann wrote:
> >
> > > Not sure if we can detect the other form reliably from perl.
> >
> > yes, i already mentioned both of these issues.  that's why i
> > suggested we start adding "extern" to all the headers (or at least
> > the userspace ones).
>
> The general trend seems to be to remove the "extern" keyword from
> kernel headers, because it is not interpreted, just like the 'auto'
> keyword. In fact, only few of them currently carry the extern keyword:
>
> $ ctags -f- -R --c-kinds=p obj/usr/include/ | grep extern | wc -l
> 33
>
> $ ctags -f- -R --c-kinds=p obj/usr/include/ | grep -v extern | wc -l
> 191
>
> Note that this is a completely separate issue from extern variable
> declarations, which should to be disallowed in any case, and are easy
> to detect as they always require the extern keyword.

in addition... what business does the kernel have to provide function
prototypes to userspace, other than the system call prototypes?

--
Arjan van de Ven Intel Open Source Technology Centre
For development, discussion and tips for power savings,
visit http://www.lesswatts.org