Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1415512

Re: [PATCH] kconfig.h: use already defined macros for IS_REACHABLE() define

From Nicolas Pitre <nicolas.pitre@linaro.org>
Newsgroups linux.kernel
Subject Re: [PATCH] kconfig.h: use already defined macros for IS_REACHABLE() define
Date 2016-06-07 00:10 +0200
Message-ID <rHaSB-2px-17@gated-at.bofh.it> (permalink)
References <rGZ18-2XO-31@gated-at.bofh.it> <rH5Jf-7nV-9@gated-at.bofh.it> <rHazf-1ZA-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, 7 Jun 2016, Masahiro Yamada wrote:

> Because config_enabled() is so useful,
> maybe people tend to abuse it.
> 
> I see one case where config_enabled() is used
> for a non-config macro.
> 
> #define __EXPORT_SYMBOL(sym, sec) \
>            __cond_export_sym(sym, sec, config_enabled(__KSYM_##sym))

Here the need is for a macro that returns 1 or 0 whether given 
symbol is defined or not, exactly as explained in the comment above the 
definition for config_enabled() which in itself has nothing to do with 
config.

So maybe config_enabled() should be renamed to __is_defined() or 
similar, and then config_enabled() or its replacement defined in termps 
of it.


Nicolas

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] kconfig.h: use already defined macros for IS_REACHABLE() define Masahiro Yamada <yamada.masahiro@socionext.com> - 2016-06-06 11:30 +0200
  Re: [PATCH] kconfig.h: use already defined macros for IS_REACHABLE() define Linus Torvalds <torvalds@linux-foundation.org> - 2016-06-06 18:40 +0200
    Re: [PATCH] kconfig.h: use already defined macros for IS_REACHABLE() define Masahiro Yamada <yamada.masahiro@socionext.com> - 2016-06-06 23:50 +0200
      Re: [PATCH] kconfig.h: use already defined macros for IS_REACHABLE()  define Nicolas Pitre <nicolas.pitre@linaro.org> - 2016-06-07 00:10 +0200

csiph-web