lkml.org 
[lkml]   [2007]   [Oct]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectfinding 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/

\
 
 \ /
  Last update: 2007-10-26 14:09    [W:0.119 / U:0.328 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site