[ath9k-devel] [PATCH] tree-wide: replace config_enabled() with IS_ENABLED()

Kees Cook <[email protected]>
Newsgroups org.ath9k.lists.ath9k-devel,org.freedesktop.lists.dri-devel,org.infradead.lists.ath10k,org.infradead.lists.linux-mtd,org.kernel.vger.linux-mips,org.kernel.vger.linux-serial,org.kernel.vger.netdev
Message-ID <CAGXu5j+z-QOG+x6ie+BYVTmopCSZrLzzH3A2zLE1nQi+Q+WyKg@mail.gmail.com>
On Mon, Jun 6, 2016 at 5:20 AM, Masahiro Yamada
<[email protected]> 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.
>
> Signed-off-by: Masahiro Yamada <[email protected]>

Sounds good to me! :)

Acked-by: Kees Cook <[email protected]>

-- 
Kees Cook
Chrome OS & Brillo Security
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.