LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: "Robert P. J. Day" <rpjday@mindspring.com>
To: Oleg Verych <olecom@flower.upol.cz>
Cc: linux-kernel@vger.kernel.org
Subject: Re: identifying CONFIG variable typoes in the source tree
Date: Tue, 23 Jan 2007 21:02:55 -0500 (EST)	[thread overview]
Message-ID: <Pine.LNX.4.64.0701232056040.7737@CPE00045a9c397f-CM001225dbafb6> (raw)
In-Reply-To: <slrnerd7e8.e7s.olecom@flower.upol.cz>

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1607 bytes --]


On Tue, 23 Jan 2007, Oleg Verych wrote:

> On 2007-01-23, Robert P. J. Day wrote:
> []
> >   what it does is scan the entire tree for lines of the form
> >
> > ...if... CONFIG_whatever...
> >
> > collects all of those CONFIG variables and, one at a time, checks to
> > see if that variable even exists in any Kconfig file in the tree so
> > that it could possibly ever be set.  (i'm not guaranteeing that the
> > script is perfect, but it does generate some interesting results.)
> >
> >   the first few lines of output:
> >
> > 53C700_BE_BUS
> > 64_BIT
> > 68328_SERIAL_UART2
> > ...
> >
> []
> >   the script turns up 284 examples of this.
>
> Next, this script must to learn how to search whom to send this info.
> And if there's nobody, just to make list of known orphans ;).

  i'm pretty sure that's not going to happen this evening, but i
tweaked the script just a bit so you can run it (from the top-level
directory) against any subdirectory to see what CONFIG symbols appear
to be (for lack of a better word) "orphaned."

  let's test it against, say, fs/xfs:

$ ../config_vars.sh fs/xfs
FS_POSIX_CAP
FS_POSIX_MAC
XFS_DEBUG
XFS_DMAPI
XFS_TRACE

$ grep -r FS_POSIX_CAP .
fs/xfs/xfs_cap.h:#ifdef CONFIG_FS_POSIX_CAP

$ grep -r FS_POSIX_MAC .
./fs/xfs/xfs_mac.h:#ifdef CONFIG_FS_POSIX_MAC

$ grep -r XFS_DEBUG .
./fs/xfs/xfs.h:#ifdef CONFIG_XFS_DEBUG
./fs/xfs/Makefile-linux-2.6:ifeq ($(CONFIG_XFS_DEBUG),y)

and so on.  of course, there may be good reasons for some of these
variables to be there with no corresponding Kconfig entry -- i'm just
printing them out.

rday

p.s. new script is attached.

[-- Attachment #2: Type: APPLICATION/x-sh, Size: 435 bytes --]

  reply	other threads:[~2007-01-24  2:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-23 21:13 Robert P. J. Day
2007-01-23 23:35 ` Oleg Verych
2007-01-24  2:02   ` Robert P. J. Day [this message]
2007-01-24  8:21 ` Geert Uytterhoeven
2007-01-24 10:33   ` Robert P. J. Day

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.64.0701232056040.7737@CPE00045a9c397f-CM001225dbafb6 \
    --to=rpjday@mindspring.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=olecom@flower.upol.cz \
    --subject='Re: identifying CONFIG variable typoes in the source tree' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).