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

Sam Ravnborg
2008-12-27T18:42:34Z

On Sat, Dec 27, 2008 at 02:43:36AM -0500, Mike Frysinger wrote:
> Since prototypes with "extern" refer to kernel functions, they make no
> sense in userspace, so reject them automatically.

Hi Mike.

I do agree with this - but adding this check resulted in:
usr/include/linux/coda_psdev.h:90: extern's make no sense in userspace
usr/include/linux/elf-fdpic.h:62: extern's make no sense in userspace
usr/include/linux/elf.h:379: extern's make no sense in userspace
usr/include/linux/elf.h:387: extern's make no sense in userspace
usr/include/linux/elf.h:401: extern's make no sense in userspace
usr/include/linux/elf.h:402: extern's make no sense in userspace
usr/include/linux/fs.h:24: extern's make no sense in userspace
usr/include/linux/fs.h:41: extern's make no sense in userspace
usr/include/linux/fs.h:42: extern's make no sense in userspace
usr/include/linux/fs.h:49: extern's make no sense in userspace
usr/include/linux/fs.h:51: extern's make no sense in userspace
usr/include/linux/fs.h:54: extern's make no sense in userspace
usr/include/linux/hid.h:74: extern's make no sense in userspace
usr/include/linux/in6.h:47: extern's make no sense in userspace
usr/include/linux/in6.h:49: extern's make no sense in userspace
usr/include/linux/nubus.h:296: extern's make no sense in userspace
usr/include/linux/nubus.h:298: extern's make no sense in userspace
usr/include/linux/nubus.h:302: extern's make no sense in userspace
usr/include/linux/reiserfs_fs.h:687: extern's make no sense in userspace
usr/include/linux/reiserfs_fs.h:995: extern's make no sense in userspace
usr/include/linux/reiserfs_fs.h:997: extern's make no sense in userspace
usr/include/linux/reiserfs_fs.h:1467: extern's make no sense in userspace
usr/include/linux/reiserfs_fs.h:1760: extern's make no sense in userspace
usr/include/linux/reiserfs_fs.h:1764: extern's make no sense in userspace
usr/include/linux/reiserfs_fs.h:1766: extern's make no sense in userspace
usr/include/linux/reiserfs_fs.h:1769: extern's make no sense in userspace
usr/include/linux/reiserfs_fs.h:1771: extern's make no sense in userspace
usr/include/linux/reiserfs_fs.h:1805: extern's make no sense in userspace
usr/include/linux/reiserfs_fs.h:1948: extern's make no sense in userspace
usr/include/linux/reiserfs_fs.h:1949: extern's make no sense in userspace
usr/include/linux/reiserfs_fs.h:1950: extern's make no sense in userspace
usr/include/linux/reiserfs_fs.h:1951: extern's make no sense in userspace
usr/include/linux/reiserfs_fs.h:1962: extern's make no sense in userspace
usr/include/linux/reiserfs_fs.h:1963: extern's make no sense in userspace
usr/include/linux/reiserfs_fs.h:1964: extern's make no sense in userspace
usr/include/linux/socket.h:29: extern's make no sense in userspace
usr/include/linux/sound.h:33: extern's make no sense in userspace
usr/include/linux/sound.h:34: extern's make no sense in userspace
usr/include/linux/sound.h:35: extern's make no sense in userspace
usr/include/linux/sound.h:36: extern's make no sense in userspace
usr/include/linux/sound.h:37: extern's make no sense in userspace
usr/include/linux/sound.h:39: extern's make no sense in userspace
usr/include/linux/sound.h:40: extern's make no sense in userspace
usr/include/linux/sound.h:41: extern's make no sense in userspace
usr/include/linux/sound.h:42: extern's make no sense in userspace
usr/include/linux/soundcard.h:1047: extern's make no sense in userspace
usr/include/linux/soundcard.h:1048: extern's make no sense in userspace
usr/include/linux/soundcard.h:1049: extern's make no sense in userspace
usr/include/linux/soundcard.h:1050: extern's make no sense in userspace
usr/include/linux/soundcard.h:1051: extern's make no sense in userspace
usr/include/linux/soundcard.h:1053: extern's make no sense in userspace
usr/include/linux/soundcard.h:1055: extern's make no sense in userspace
usr/include/linux/soundcard.h:1056: extern's make no sense in userspace
usr/include/linux/soundcard.h:1061: extern's make no sense in userspace
usr/include/linux/soundcard.h:1062: extern's make no sense in userspace
usr/include/linux/soundcard.h:1078: extern's make no sense in userspace
usr/include/linux/soundcard.h:1079: extern's make no sense in userspace

And we need to get these fixed before we apply this patch.
Otherwise we will break every allyesconfig/allmodconfig builds

Sam