Skip to contentSkip to conversation

any remaining value to EXPORT_UNUSED_SYMBOL{,_GPL} macros?

DISCUSSION Robert P. J. Day 1 participant 1 message Jul 15, 2009

lore
Share & tools
lore
#0 lore raw

i asked this on the kernel newbies list since it seemed fairly
trivial but perhaps it's better to ask it here. is there any value to hanging onto those two macro definitions given this from Documentation/feature-removal-schedule.txt:

What: Unused EXPORT_SYMBOL/EXPORT_SYMBOL_GPL exports
(temporary transition config option provided until then) The transition config option will also be removed at the same time.

When:   before 2.6.19
Why:    Unused symbols are both increasing the size of the kernel binary

and are often a sign of "wrong API"
Who: Arjan van de Ven <[email protected]>

and that a scan of the entire source tree reveals:

$ grep -r EXPORT_UNUSED_SYMBOL *
fs/libfs.c:EXPORT_UNUSED_SYMBOL(simple_prepare_write);
include/linux/module.h:#define EXPORT_UNUSED_SYMBOL(sym) __EXPORT_SYMBOL(sym, "_unused")
include/linux/module.h:#define EXPORT_UNUSED_SYMBOL_GPL(sym) __EXPORT_SYMBOL(sym, "_unused_gpl")
include/linux/module.h:#define EXPORT_UNUSED_SYMBOL(sym)
include/linux/module.h:#define EXPORT_UNUSED_SYMBOL_GPL(sym)
include/linux/module.h:#define EXPORT_UNUSED_SYMBOL(sym)
include/linux/module.h:#define EXPORT_UNUSED_SYMBOL_GPL(sym)
scripts/checkpatch.pl:		    ($line =~ /EXPORT_UNUSED_SYMBOL.*\((.*)\)/)) {
scripts/mod/modpost.c:	{ .str = "EXPORT_UNUSED_SYMBOL",     .export = export_unused },
scripts/mod/modpost.c:	{ .str = "EXPORT_UNUSED_SYMBOL_GPL", .export = export_unused_gpl },

in short, one actual usage in fs/libfs.c, and a bunch of other
references that contribute nothing to their value.

thoughts? if these macros have been deprecated for a while, why not
just dump that final usage and get rid of them?

rday
--

========================================================================
Robert P. J. Day Waterloo, Ontario, CANADA

Linux Consulting, Training and Annoying Kernel Pedantry.

Web page:                                          http://crashcourse.ca
Twitter:                                       http://twitter.com/rpjday

"Kernel Newbie Corner" column @ linux.com: http://cli.gs/WG6WYX
========================================================================