LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* finding macro names that might need a "CONFIG_" prefix
@ 2007-02-02 9:22 Robert P. J. Day
0 siblings, 0 replies; only message in thread
From: Robert P. J. Day @ 2007-02-02 9:22 UTC (permalink / raw)
To: Linux kernel mailing list
as another test, i wrote the following script:
http://www.fsdev.dreamhosters.com/wiki/index.php?title=Misspelled_CONFIG_variables
that scans whatever part of the kernel source tree you want, and
locates macro names in preprocessor conditionals that might be
erroneously missing a "CONFIG_" prefix.
as an example (and for no particular reason), let's pick on the
reiser file system:
$ bad_config.sh fs/reiserfs/
========== REISERFS_PROC_INFO ==========
fs/reiserfs/procfs.c:#if defined( REISERFS_PROC_INFO )
fs/reiserfs/procfs.c:/* REISERFS_PROC_INFO */
fs/reiserfs/procfs.c:/* REISERFS_PROC_INFO */
./fs/Kconfig:config REISERFS_PROC_INFO
that looks pretty clearly like someone should be testing
"CONFIG_REISERFS_PROC_INFO" rather than just "REISERFS_PROC_INFO", no?
what about NTFS?
$ bad_config.sh fs/ntfs
========== NTFS_DEBUG ==========
fs/ntfs/attrib.c:#ifdef NTFS_DEBUG <--- aha!
./fs/Kconfig:config NTFS_DEBUG
========== NTFS_RW ==========
fs/ntfs/logfile.h:#ifdef NTFS_RW <--- another potential aha
fs/ntfs/logfile.h:#endif /* NTFS_RW */
... lots of dups removed ...
./fs/Kconfig:config NTFS_RW
anyway, you get the idea. have at it.
rday
--
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA
http://www.fsdev.dreamhosters.com/wiki/index.php?title=Main_Page
========================================================================
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-02-02 9:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-02 9:22 finding macro names that might need a "CONFIG_" prefix 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;
as well as URLs for NNTP newsgroup(s).