• Masahiro Yamada's avatar
    linux/kconfig.h: replace IF_ENABLED() with PTR_IF() in <linux/kernel.h> · 0ab1438b
    Masahiro Yamada authored
    <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: default avatarMasahiro Yamada <masahiroy@kernel.org>
    Reviewed-by: default avatarKees Cook <keescook@chromium.org>
    0ab1438b
pinctrl-ingenic.c 159 KB