Re: [PATCH] CodingStyle: Expand IS_ENABLED() documentation

2016-09-27 Thread Bjorn Helgaas
On Tue, Sep 27, 2016 at 09:32:08PM +0200, Paul Bolle wrote: > 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() w

Re: [PATCH] CodingStyle: Expand IS_ENABLED() documentation

2016-09-27 Thread Paul Bolle
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

[PATCH] CodingStyle: Expand IS_ENABLED() documentation

2016-09-27 Thread Bjorn Helgaas
CodingStyle recommends IS_ENABLED(CONFIG_FOO) over #ifdef. Add an example of the #ifdef, since it's not completely obvious that in many cases the #ifdef needs to test both CONFIG_FOO and CONFIG_FOO_MODULE. Signed-off-by: Bjorn Helgaas --- Documentation/CodingStyle | 15 +-- includ