OSDN Git Service

kconfig.h: use already defined macros for IS_REACHABLE() define
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Tue, 14 Jun 2016 05:58:56 +0000 (14:58 +0900)
committerMichal Marek <mmarek@suse.com>
Mon, 20 Jun 2016 20:42:32 +0000 (22:42 +0200)
For the same reason as commit 02d699f1f464 ("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: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Michal Marek <mmarek@suse.com>
include/linux/kconfig.h

index a94b5bf..722c7d2 100644 (file)
@@ -42,8 +42,8 @@
  * This is similar to IS_ENABLED(), but returns false when invoked from
  * built-in code when CONFIG_FOO is set to 'm'.
  */
-#define IS_REACHABLE(option) (config_enabled(option) || \
-                (config_enabled(option##_MODULE) && __is_defined(MODULE)))
+#define IS_REACHABLE(option) (IS_BUILTIN(option) || \
+                (IS_MODULE(option) && __is_defined(MODULE)))
 
 /*
  * IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',