lkml.org 
[lkml]   [2010]   [Nov]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectrunning my kernel scanning scripts on your favourite part of the tree

not sure when i'll get the time to do another pass over the kernel
source tree with my kernel cleanup scripts but anyone who's
interested is welcome to download the scripts from here:

http://www.crashcourse.ca/wiki/index.php/Kernel_cleanup_scripts

to check out whatever part of the tree they want.

as a simple example, i can run the script to find "badref" config
variables on, say, the drivers/mtd part of the tree:

$ ../s/find_badref_configs.sh drivers/mtd
>>>>> MTD_SUPERH_RESERVE
drivers/mtd/maps/solutionengine.c:38:#ifdef CONFIG_MTD_SUPERH_RESERVE
drivers/mtd/maps/solutionengine.c:44: .size = CONFIG_MTD_SUPERH_RESERVE,
drivers/mtd/maps/solutionengine.c:54:#endif /* CONFIG_MTD_SUPERH_RESERVE */
drivers/mtd/maps/solutionengine.c:97:#ifdef CONFIG_MTD_SUPERH_RESERVE
drivers/mtd/maps/solutionengine.c:100: CONFIG_MTD_SUPERH_RESERVE);
drivers/mtd/maps/solutionengine.c:104:#endif /* CONFIG_MTD_SUPERH_RESERVE */
$
that tells me that, under drivers/mtd, there's some file that
insists on testing CONFIG_MTD_SUPERH_RESERVE even though no Kconfig
file defines such a variable.

the other common check is to look for the exact opposite --
variables defined in a Kconfig file that are never tested anywhere.
once again, let's pick on drivers/mtd:

$ ../s/find_unused_configs.sh drivers/mtd
===== MTD_NAND_ATMEL_ECC_SOFT
drivers/mtd/nand/Kconfig:375:config MTD_NAND_ATMEL_ECC_SOFT
$
that should be self-explanatory. anyway, have at it if it interests
you.

rday


--

========================================================================
Robert P. J. Day Waterloo, Ontario, CANADA
http://crashcourse.ca
Twitter: http://twitter.com/rpjday
LinkedIn: http://ca.linkedin.com/in/rpjday
========================================================================

\
 
 \ /
  Last update: 2010-11-09 13:19    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site