Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1492125
| From | Paul Bolle <pebolle@tiscali.nl> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] CodingStyle: Expand IS_ENABLED() documentation |
| Date | 2016-09-27 21:40 +0200 |
| Message-ID | <sm6oq-58G-27@gated-at.bofh.it> (permalink) |
| References | <sm5Vo-4Z0-23@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, 2016-09-27 at 14:08 -0500, Bjorn Helgaas wrote: > --- a/Documentation/CodingStyle > +++ b/Documentation/CodingStyle > +Because the compiler processes the block, you have to use an #ifdef instead > +of IS_ENABLED() when code inside the block references symbols that will not > +exist if the condition is not met. Different CONFIG_FOO autoconf.h symbols > +are generated for modular Kconfig options than for builtin ones, so you > +need "#if defined(CONFIG_FOO) || defined(CONFIG_FOO_MODULE)" Isn't that equivalent to "#if IS_ENABLED(CONFIG_FOO)"? > if FOO can be > +a module: > + > + .config include/generated/autoconf.h > + ------------ ---------------------------- > + CONFIG_FOO=y #define CONFIG_FOO 1 > + CONFIG_FOO=m #define CONFIG_FOO_MODULE 1 Paul Bolle
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] CodingStyle: Expand IS_ENABLED() documentation Bjorn Helgaas <bhelgaas@google.com> - 2016-09-27 21:10 +0200
Re: [PATCH] CodingStyle: Expand IS_ENABLED() documentation Paul Bolle <pebolle@tiscali.nl> - 2016-09-27 21:40 +0200
Re: [PATCH] CodingStyle: Expand IS_ENABLED() documentation Bjorn Helgaas <helgaas@kernel.org> - 2016-09-27 22:40 +0200
csiph-web