Re: identifying CONFIG variable typoes in the source tree

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

 



On Wed, 24 Jan 2007, Geert Uytterhoeven wrote:

> On Tue, 23 Jan 2007, Robert P. J. Day wrote:
> >   let's check these:
> >
> > $ grep -r 53C700_BE_BUS .
> > ./drivers/scsi/53c700.h:#ifdef CONFIG_53C700_BE_BUS
>
> This is the core support for big endian 53c700 SCSI busses. It's
> needed for various m68k machines, patch to be submitted when the
> m68k support is ready for submission.
>
> Gr{oetje,eeting}s,

  just to be clear, all that script is doing is identifying variables
of the form "CONFIG_fubar" that are being tested in *some*
preprocessor directive somewhere in the tree, but for which there is
apparently no corresponding entry in a Kconfig file anywhere that
could cause that variable to be configured.

  naturally, as geert suggests, this might represent a feature that's
in progress so it's clearly not a mistake.  but it's a good way to
trap potential problems, as in finding "GALILLEO_GT64240_ETH" which,
superficially, would seem like an obvious typo no matter what:

$ grep -r GALILLEO_GT64240_ETH .
./arch/mips/momentum/ocelot_g/prom.c:#ifdef CONFIG_GALILLEO_GT64240_ETH
./arch/mips/momentum/ocelot_g/prom.c:#ifdef CONFIG_GALILLEO_GT64240_ETH
./arch/mips/momentum/ocelot_g/setup.c:#ifdef CONFIG_GALILLEO_GT64240_ETH
./arch/mips/momentum/ocelot_g/setup.c:#ifdef CONFIG_GALILLEO_GT64240_ETH
$

as well as what is *obviously* dead code:

$ grep -rw CONFIG_KERNELD .
./sound/core/timer.c:#ifdef CONFIG_KERNELD
$ grep -rw KERNELD .
./net/core/dev.c: *             Bjorn Ekwall    :       Added KERNELD hack.

  the script isn't perfect -- it will generate false positives if the
variable is being set elsewhere -- perhaps hardcoded in the file or
defined in a Makefile.  but if you're curious, just run it against
your favourite subdirectory and see what comes up.

rday

-
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