once again, tracking down misconfigured CONFIG variables

From: Robert P. J. Day
Date: Tue May 24 2011 - 09:00:23 EST



now that we're into another merge window, i'll try to find time this
week to run my kernel scanning/cleanup scripts to find discrepancies
in the source related to unused/misreferenced Kconfig variables and
similar things.

the top level of the output from the last time i did this is here:

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

so you can follow any of those links to see the more specific output,
much of which i'm guessing is still valid.

you're also welcome to run the scripts yourself, they're here (and
probably need a bit of tweaking these days):

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

you can run these scripts with an argument of the specific source
directory that interests you, so here's an example based on a recent
"git pull", showing what i call "badrefs" for CONFIG variables:

$ ../s/find_badref_configs.sh kernel
>>>>> DEBUG_SHIRQ_FIXME
kernel/irq/manage.c:1329:#ifdef CONFIG_DEBUG_SHIRQ_FIXME
>>>>> HIGHRES_TIMERS
kernel/hrtimer.c:751:#ifdef CONFIG_HIGHRES_TIMERS
>>>>> KDB_CONTINUE_CATASTROPHIC
kernel/debug/kdb/kdb_main.c:70:#ifdef CONFIG_KDB_CONTINUE_CATASTROPHIC
kernel/debug/kdb/kdb_main.c:72: CONFIG_KDB_CONTINUE_CATASTROPHIC;
$

in other words, under the top-level "kernel" directory, there are
preprocessor tests for CONFIG variables that don't appear to be
defined anywhere and are therefore useless. same thing for the entire
"fs" directory:

$ ../s/find_badref_configs.sh fs
>>>>> BEFS_RW
fs/befs/linuxvfs.c:786:#ifndef CONFIG_BEFS_RW
fs/befs/linuxvfs.c:792:#endif /* CONFIG_BEFS_RW */
>>>>> CIFS_DNOTIFY_EXPERIMENTAL
fs/cifs/cifsglob.h:784:#ifdef CONFIG_CIFS_DNOTIFY_EXPERIMENTAL /* unused temporarily */
fs/cifs/cifsfs.c:990:#ifdef CONFIG_CIFS_DNOTIFY_EXPERIMENTAL /* unused temporarily */
fs/cifs/cifsproto.h:392:#ifdef CONFIG_CIFS_DNOTIFY_EXPERIMENTAL /* unused temporarily */
fs/cifs/cifssmb.c:5735:#ifdef CONFIG_CIFS_DNOTIFY_EXPERIMENTAL /* BB unused temporarily */
>>>>> CIFS_SYMLINK_EXPERIMENTAL
fs/cifs/cifsproto.h:311:#ifdef CONFIG_CIFS_SYMLINK_EXPERIMENTAL
fs/cifs/cifssmb.c:2524:#ifdef CONFIG_CIFS_SYMLINK_EXPERIMENTAL
fs/cifs/cifssmb.c:2636:#endif /* CIFS_SYMLINK_EXPERIMENTAL */ /* BB temporarily unused */
>>>>> KDB_MODULES
fs/xfs/linux-2.6/xfs_buf.h:342:#ifdef CONFIG_KDB_MODULES
fs/xfs/linux-2.6/xfs_buf.c:1893:#ifdef CONFIG_KDB_MODULES
>>>>> NILFS_POSIX_ACL
fs/nilfs2/nilfs.h:189:#ifdef CONFIG_NILFS_POSIX_ACL
>>>>> NILFS_XATTR
fs/nilfs2/nilfs.h:49:#ifdef CONFIG_NILFS_XATTR
fs/nilfs2/super.c:1376:#ifdef CONFIG_NILFS_XATTR
$

you get the idea. and if people are talking about an eventual 3.0,
part of that process should be a concerted effort to get rid of all
this historical cruft that's been hanging around, some of it for a
long, long time.

rday

--

========================================================================
Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca

Twitter: http://twitter.com/rpjday
LinkedIn: http://ca.linkedin.com/in/rpjday
========================================================================


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/