Masahiro Yamada 0ab1438bad linux/kconfig.h: replace IF_ENABLED() with PTR_IF() in <linux/kernel.h>
<linux/kconfig.h> is included from all the kernel-space source files,
including C, assembly, linker scripts. It is intended to contain a
minimal set of macros to evaluate CONFIG options.

IF_ENABLED() is an intruder here because (x ? y : z) is C code, which
should not be included from assembly files or linker scripts.

Also, <linux/kconfig.h> is no longer self-contained because NULL is
defined in <linux/stddef.h>.

Move IF_ENABLED() out to <linux/kernel.h> as PTR_IF(). PTF_IF()
takes the general boolean expression instead of a CONFIG option
so that it fits better in <linux/kernel.h>.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
2021-05-09 00:29:45 +09:00
..
2021-04-29 11:28:08 -07:00
2021-04-13 23:15:09 +02:00
2021-04-28 09:24:36 -07:00
2021-04-28 17:22:10 -07:00
2021-04-29 11:57:23 -07:00
2021-04-26 16:59:21 +02:00
2021-04-30 15:23:16 -07:00