Messages in this thread | | | Date | Fri, 26 Oct 2007 08:04:48 -0400 (EDT) | From | "Robert P. J. Day" <> | Subject | finding unused Kconfig variables in the source tree |
| |
as i mentioned in an earlier post, i threw together a quick script that scans the source tree, not for dead CONFIG vars (those that are checked but never defined in a Kconfig file) but for the exact opposite -- those that are *defined* in a Kconfig file but are apparently never used anywhere.
for example (since the CRIS architecture came up recently), here's the first few lines of output (the script is still running as we speak):
$ ../find_unused_configs.sh arch/cris >>>>> ETRAX_ETHERNET_HW_CSUM arch/cris/arch-v32/drivers/Kconfig:config ETRAX_ETHERNET_HW_CSUM >>>>> ETRAX_ETHERNET_IFACE0 arch/cris/arch-v32/drivers/Kconfig:config ETRAX_ETHERNET_IFACE0 ...
that tells me that, unless i've completely screwed my programming, a Kconfig file defines the variable ETRAX_ETHERNET_HW_CSUM, which is subsequently never referenced by anything anywhere in the tree. (that would normally suggest a feature that was removed from the tree without removing its controlling CONFIG variable.)
i'll run this on bits of the tree at a time and send the results to the appropriate people, at which point they can do what they want in terms of cleaning Kconfig files.
rday
p.s. perhaps one of the CRIS folks could verify that those variables are, in fact, unused, so i know i haven't screwed something up horribly.
-- ======================================================================== Robert P. J. Day Linux Consulting, Training and Annoying Kernel Pedantry Waterloo, Ontario, CANADA
http://crashcourse.ca ======================================================================== - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |