Skip to content

Commit

Permalink
kconfig.h: use already defined macros for IS_REACHABLE() define
Browse files Browse the repository at this point in the history
For the same reason as commit 02d699f ("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>
  • Loading branch information
Masahiro Yamada authored and Michal Marek committed Jun 20, 2016
1 parent 6023d23 commit 05a25c8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/linux/kconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 05a25c8

Please sign in to comment.