public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* running my kernel scanning scripts on your favourite part of the tree
@ 2010-11-09 12:16 Robert P. J. Day
  2010-11-25 16:14 ` Unused config options in drivers/mtd (Re: running my kernel scanning scripts on your favourite part of the tree) Michal Marek
  0 siblings, 1 reply; 5+ messages in thread
From: Robert P. J. Day @ 2010-11-09 12:16 UTC (permalink / raw)
  To: Linux Kernel Mailing List


  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
========================================================================

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-11-26 16:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-09 12:16 running my kernel scanning scripts on your favourite part of the tree Robert P. J. Day
2010-11-25 16:14 ` Unused config options in drivers/mtd (Re: running my kernel scanning scripts on your favourite part of the tree) Michal Marek
2010-11-26 16:29   ` Robert P. J. Day
2010-11-26 16:42     ` Michal Marek
2010-11-26 16:52       ` Robert P. J. Day

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox