From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935073AbcI0Ucm (ORCPT ); Tue, 27 Sep 2016 16:32:42 -0400 Received: from mail.kernel.org ([198.145.29.136]:51992 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932747AbcI0Ucc (ORCPT ); Tue, 27 Sep 2016 16:32:32 -0400 Date: Tue, 27 Sep 2016 15:32:28 -0500 From: Bjorn Helgaas To: Paul Bolle Cc: Bjorn Helgaas , Jonathan Corbet , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org Subject: Re: [PATCH] CodingStyle: Expand IS_ENABLED() documentation Message-ID: <20160927203228.GA19882@localhost> References: <20160927190802.13636.10320.stgit@bhelgaas-glaptop2.roam.corp.google.com> <1475004728.16606.8.camel@tiscali.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1475004728.16606.8.camel@tiscali.nl> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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() 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)"? Yep, I think so. Sigh. I'll look again. Maybe what's already there can't be improved.