From: Andrew Morton <akpm@linux-foundation.org>
To: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: linux-kernel@vger.kernel.org, Stas Sergeev <stsp@list.ru>,
Matt Redfearn <matt.redfearn@imgtec.com>,
Joshua Kinard <kumba@gentoo.org>, Jiri Slaby <jslaby@suse.com>,
Bjorn Helgaas <bhelgaas@google.com>,
linux-pci@vger.kernel.org, Borislav Petkov <bp@suse.de>,
dri-devel@lists.freedesktop.org,
Markos Chandras <markos.chandras@imgtec.com>,
"Dmitry V. Levin" <ldv@altlinux.org>,
yu-cheng yu <yu-cheng.yu@intel.com>,
James Hogan <james.hogan@imgtec.com>,
Brian Gerst <brgerst@gmail.com>,
Johannes Berg <johannes@sipsolutions.net>,
Peter Zijlstra <peterz@infradead.org>,
Al Viro <viro@zeniv.linux.org.uk>, Will Drewry <wad@chromium.org>,
Nikolay Martynov <mar.kolya@gmail.com>,
Huacai Chen <chenhc@lemote.com>,
x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
Thom
Subject: Re: [PATCH] tree-wide: replace config_enabled() with IS_ENABLED()
Date: Tue, 7 Jun 2016 15:29:30 -0700 [thread overview]
Message-ID: <20160607152930.71273719bdaea322814213d0@linux-foundation.org> (raw)
In-Reply-To: <1465215656-20569-1-git-send-email-yamada.masahiro@socionext.com>
On Mon, 6 Jun 2016 21:20:56 +0900 Masahiro Yamada <yamada.masahiro@socionext.com> wrote:
> The use of config_enabled() against config options is ambiguous.
> In practical terms, config_enabled() is equivalent to IS_BUILTIN(),
> but the author might have used it for the meaning of IS_ENABLED().
> Using IS_ENABLED(), IS_BUILTIN(), IS_MODULE() etc. makes the
> intention clearer.
>
> This commit replaces config_enabled() with IS_ENABLED() where
> possible. This commit is only touching bool config options.
>
> I noticed two cases where config_enabled() is used against a tristate
> option:
>
> - config_enabled(CONFIG_HWMON)
> [ drivers/net/wireless/ath/ath10k/thermal.c ]
>
> - config_enabled(CONFIG_BACKLIGHT_CLASS_DEVICE)
> [ drivers/gpu/drm/gma500/opregion.c ]
>
> I did not touch them because they should be converted to IS_BUILTIN()
> in order to keep the logic, but I was not sure it was the authors'
> intention.
Well, we do want to be able to remove config_enabled() altogether if
we're going to do this. So please later send along a patch which makes
a best-effort fix of the unclear usages and let's zap the thing.
If those fixes weren't quite correct then there will be a build error
(drivers/net/wireless/ath/ath10k/thermal.c) or no change in behaviour
(drivers/gpu/drm/gma500/opregion.c).
prev parent reply other threads:[~2016-06-07 22:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-06 12:20 [PATCH] tree-wide: replace config_enabled() with IS_ENABLED() Masahiro Yamada
2016-06-06 15:53 ` Kees Cook
2016-06-07 22:29 ` Andrew Morton [this message]
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=20160607152930.71273719bdaea322814213d0@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=bhelgaas@google.com \
--cc=bp@suse.de \
--cc=brgerst@gmail.com \
--cc=chenhc@lemote.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=hpa@zytor.com \
--cc=james.hogan@imgtec.com \
--cc=johannes@sipsolutions.net \
--cc=jslaby@suse.com \
--cc=kumba@gentoo.org \
--cc=ldv@altlinux.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=mar.kolya@gmail.com \
--cc=markos.chandras@imgtec.com \
--cc=matt.redfearn@imgtec.com \
--cc=peterz@infradead.org \
--cc=stsp@list.ru \
--cc=viro@zeniv.linux.org.uk \
--cc=wad@chromium.org \
--cc=x86@kernel.org \
--cc=yamada.masahiro@socionext.com \
--cc=yu-cheng.yu@intel.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;
as well as URLs for NNTP newsgroup(s).