Re: [PATCH] CodingStyle: Expand IS_ENABLED() documentation

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

 



On Tue, 2016-09-27 at 14:08 -0500, Bjorn Helgaas wrote:

> --- a/Documentation/CodingStyle
> +++ b/Documentation/CodingStyle

> +Because the compiler processes the block, you have to use an #ifdef instead
> +of IS_ENABLED() when code inside the block references symbols that will not
> +exist if the condition is not met.  Different CONFIG_FOO autoconf.h symbols
> +are generated for modular Kconfig options than for builtin ones, so you
> +need "#if defined(CONFIG_FOO) || defined(CONFIG_FOO_MODULE)"

Isn't that equivalent to "#if IS_ENABLED(CONFIG_FOO)"?

> if FOO can be
> +a module:
> +
> +	.config			include/generated/autoconf.h
> +	------------		----------------------------
> +	CONFIG_FOO=y		#define CONFIG_FOO 1
> +	CONFIG_FOO=m		#define CONFIG_FOO_MODULE 1


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



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux