From: James Bottomley <jejb@linux.vnet.ibm.com>
To: LEROY Christophe <christophe.leroy@c-s.fr>,
Arnd Bergmann <arnd@arndb.de>
Cc: linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
linux-m68k <linux-m68k@lists.linux-m68k.org>,
Finn Thain <fthain@telegraphics.com.au>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
linux-scsi <linux-scsi@vger.kernel.org>,
Michael Schmitz <schmitzmic@gmail.com>
Subject: Re: [PATCH v8 01/25] scsi/atari_scsi: Don't select CONFIG_NVRAM
Date: Sun, 30 Dec 2018 10:06:43 -0800 [thread overview]
Message-ID: <1546193203.2844.9.camel@linux.vnet.ibm.com> (raw)
In-Reply-To: <20181230185002.Horde.AdSknvcs4hP1Kh_T_Cos6w8@messagerie.si.c-s.fr>
On Sun, 2018-12-30 at 18:50 +0100, LEROY Christophe wrote:
> Arnd Bergmann <arnd@arndb.de> a écrit :
> > On Sat, Dec 29, 2018 at 3:51 AM Michael Schmitz
> > <schmitzmic@gmail.com> wrote:
[...]
> > > (On second thought - I don't want to speculate whether there's
> > > weird compiler options that could result in the
> > > nvram_check_checksum and nvram_read_bytes symbols to still be
> > > referenced in the final link, even though
> > > IS_BUILTIN(CONFIG_NVRAM) always evaluates to false. Best
> > > leave this as-is.)
> >
> > As far as I know, it's totally reliable with the supported
> > compilers (gcc-4.6+). In the older compilers (e.g. 4.1), there was
> > a corner case, where it could have failed to eliminate a function
> > that was only referenced through a pointer from a discarded
> > variable, but a plain IS_ENABLED() check like the one here
> > was still ok, and lots of code relies on that.
> >
> > Other than that, I agree either way is totally fine here, so no
> > objections to using the #ifdef.
>
> As far as I know, kernel codying style promotes the use of
> IS_ENABLED() etc. instead of #ifdefs when possible.
It's a preference, as with a lot of coding style stuff, which we leave
up to the maintainer.
That said, as has been pointed out, the current #ifdef has a failing
corner case when both are modular (because the code should then be
included). The runtime macro that correctly expresses this is
IS_REACHABLE(CONFIG_NVRAM).
James
next prev parent reply other threads:[~2018-12-30 18:06 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1545784679.git.fthain@telegraphics.com.au>
2018-12-26 0:37 ` [PATCH v8 01/25] scsi/atari_scsi: Don't select CONFIG_NVRAM Finn Thain
2018-12-28 16:38 ` LEROY Christophe
2018-12-29 1:06 ` Finn Thain
2018-12-29 1:33 ` Michael Schmitz
2018-12-29 2:34 ` Finn Thain
2018-12-29 2:50 ` Michael Schmitz
2018-12-29 21:37 ` Arnd Bergmann
2018-12-30 17:50 ` LEROY Christophe
2018-12-30 18:06 ` James Bottomley [this message]
2018-12-30 21:44 ` Finn Thain
2018-12-30 22:45 ` Finn Thain
2018-12-29 16:55 ` LEROY Christophe
2018-12-29 18:54 ` Michael Schmitz
2018-12-29 2:54 ` Michael Schmitz
2018-12-26 0:37 ` [PATCH v8 03/25] m68k/atari: Replace nvram_{read,write}_byte with arch_nvram_ops Finn Thain
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1546193203.2844.9.camel@linux.vnet.ibm.com \
--to=jejb@linux.vnet.ibm.com \
--cc=arnd@arndb.de \
--cc=christophe.leroy@c-s.fr \
--cc=fthain@telegraphics.com.au \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m68k@lists.linux-m68k.org \
--cc=linux-scsi@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=martin.petersen@oracle.com \
--cc=schmitzmic@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox