finding "dead" CONFIG variables: an ongoing 5-year mission ...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



  as i'm sure a few folks are aware, i occasionally run a script to
scan the tree, looking for potentially "dead" CONFIG variables -- that
is, variables of the form CONFIG_FUBAR for which there is no
corresponding FUBAR in any Kconfig file.

  i know there are some cleanups queued for post-2.6.22, and i'm going
to run the script again after andrew releases what's queued in his
tree, but if anyone is interested in checking any part of the tree
before then, the script i use is here:

  http://fsdev.net/wiki/index.php?title=Misspelled_CONFIG_variables

  yes, it generates a number of false positives (would you folks
*please* stop using a prefix of "CONFIG_" for your non-Kconfig
variables??  argh. :-)  but sometimes the output is informative:


$ dead_config.sh fs
========== BEFS_RW ==========
fs/befs/linuxvfs.c:776:#ifndef CONFIG_BEFS_RW
fs/befs/linuxvfs.c:782:#endif                           /* CONFIG_BEFS_RW */
...
========== HAS_COMPAT_EPOLL_EVENT ==========
fs/compat.c:2112:#ifdef CONFIG_HAS_COMPAT_EPOLL_EVENT
fs/compat.c:2155:#endif /* CONFIG_HAS_COMPAT_EPOLL_EVENT */
fs/compat.c:2182:#ifdef CONFIG_HAS_COMPAT_EPOLL_EVENT
========== KDB_MODULES ==========
fs/xfs/linux-2.6/xfs_buf.h:414:#ifdef CONFIG_KDB_MODULES
fs/xfs/linux-2.6/xfs_buf.c:1871:#ifdef CONFIG_KDB_MODULES
========== NCPFS_DEBUGDENTRY ==========
fs/ncpfs/ncplib_kernel.c:729:#ifdef CONFIG_NCPFS_DEBUGDENTRY
========== XFS_DEBUG ==========
fs/xfs/xfs.h:21:#ifdef CONFIG_XFS_DEBUG
fs/xfs/Makefile-linux-2.6:23:ifeq ($(CONFIG_XFS_DEBUG),y)
... etc etc ...


$ dead_config.sh drivers
...
========== 68328_SERIAL_UART2 ==========
drivers/serial/68328serial.h:184:#ifndef CONFIG_68328_SERIAL_UART2
...
========== ALMA_ANS ==========
drivers/serial/68328serial.c:109:#if defined(CONFIG_M68EZ328ADS) || defined(CONFIG_ALMA_ANS) || defined(CONFIG_DRAGONIXVZ)
...
========== BLK_DEV_MAC_MEDIABAY ==========
drivers/ide/legacy/macide.c:80:#ifdef CONFIG_BLK_DEV_MAC_MEDIABAY
drivers/ide/legacy/macide.c:131:#ifdef CONFIG_BLK_DEV_MAC_MEDIABAY
...

and on and on and tediously on.  i'll do a more complete run during
the next merge window, but feel free to check things out for yourself
before then.

rday
-- 
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA

http://fsdev.net/wiki/index.php?title=Main_Page
========================================================================
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux