Re: [PATCH 5/5] kconfig: limit IS_ENABLED & similar to CPP usage

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

 



On Wed, Apr 11, 2012 at 4:50 PM, Paul Gortmaker
<paul.gortmaker@xxxxxxxxxxxxx> wrote:
> Using IS_ENABLED() within C (vs. within CPP #if statements) requires
> us to actually define every possible bool/tristate Kconfig option
> twice (__enabled_* and __enabled_*_MODULE variants).

Why do you keep the __enabled_*[_MODULE] things alive at all?

Why can't you just check the CONFIG_xyz[_MODULE] #defines directly?

IOW, why isn't IS_ENABLED() just

  #define IS_ENABLED(option) \
    (defined(CONFIG_##option) || defined(CONFIG_##option##_MODULE))

  #define IS_BUILTIN(option) \
    (defined(CONFIG_##option))

and we're done with it all? What's the advantage of the __enabled_
thing again, when you depend on the preprocessor anyway?

                      Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux