Re: [RFC PATCH] kconfig: introduce KCONFIG_* symbols for .c files

Andrew Morton
2008-05-24T20:48:41Z

On Sat, 24 May 2008 22:24:27 +0200 Sam Ravnborg <sam@ravnborg.org> wrote:

> > It could help to get us out of the occasional sticky situation, but it
> > does seem a bit risky. What happens with Kconfig variables which are
> > just not known about at all with some .configs?
> >
> > Silly example, one could add
> >
> > if (KCONFIG_DVB_VES1820)
> >
> > to kernel/sched.c and that would work happily until someone sets DVB=n,
> > in which case I assume KCONFIG_DVB_VES1820 doesn't get defined
> > anywhere?
> It would have helped if I had applied the correct patch...
> All boolean and tristate symbols in the konfiguration have
> their symbols defined as KCONFIG_* no matter their values.
> So KCONFIG_DVB_VES1820 would get defined.

But there are still holes - KCONFIG_ARCH_FOOTBRIDGE wouldn't be defined
on x86, for example. Anything which is inside an `if' or inside an
if/source/endif will not be known about? I assume?

It's all probably not a big problem in practice - we'd need to be
more-than-usually-silly to trip over things like this.