Re: [RFC][PATCH 1/2] kconfig: Introduce KCONFIG(), KCONFIG_BUILTIN() and KCONFIG_MODULE()

Américo Wang
2011-07-26T13:01:51Z

On Tue, Jul 26, 2011 at 6:58 AM, Michal Marek <mmarek@suse.cz> wrote:
> Replace the config_is_*() macros with a variant that allows for grepping
> for usage of CONFIG_* options in the code. Usage:
>
>  if (KCONFIG(CONFIG_NUMA))
>
> or
>
>  #if KCONFIG(CONFIG_NUMA)
>
> The KCONFIG() macro evaluates to 1 if the argument is set (to either 'y'
> or 'm'), KCONFIG_BUILTIN() and KCONFIG_MODULE() test if the respective
> option is 'y' and 'm', respectively.

I think it's better to let KCONFIG_MODULE() returns true only for =m, so that
KCONFIG() will equal to KCONFIG_BUILTIN() || KCONFIG_MODULE().

BTW, the name KCONFIG(CONFIG_NUMA) seems ugly.