Commit 05a25c8e authored by Masahiro Yamada's avatar Masahiro Yamada Committed by Michal Marek

kconfig.h: use already defined macros for IS_REACHABLE() define

For the same reason as commit 02d699f1 ("include/linux/kconfig.h:
ese macros which are already defined"), it is better to use macros
IS_BUILTIN() and IS_MODULE() for defining IS_REACHABLE().
Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: default avatarMichal Marek <mmarek@suse.com>
parent 6023d236
...@@ -42,8 +42,8 @@ ...@@ -42,8 +42,8 @@
* This is similar to IS_ENABLED(), but returns false when invoked from * This is similar to IS_ENABLED(), but returns false when invoked from
* built-in code when CONFIG_FOO is set to 'm'. * built-in code when CONFIG_FOO is set to 'm'.
*/ */
#define IS_REACHABLE(option) (config_enabled(option) || \ #define IS_REACHABLE(option) (IS_BUILTIN(option) || \
(config_enabled(option##_MODULE) && __is_defined(MODULE))) (IS_MODULE(option) && __is_defined(MODULE)))
/* /*
* IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm', * IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment