Re: [PATCH] checkpatch: Add test for possible misuse of IS_ENABLED() without CONFIG_

From: Andrew Morton
Date: Fri Jun 05 2020 - 20:32:31 EST


On Fri, 05 Jun 2020 11:24:43 -0700 Joe Perches <joe@xxxxxxxxxxx> wrote:

> IS_ENABLED is almost always used with CONFIG_<FOO> defines.
>
> Add a test to verify that the #define being tested starts with CONFIG_.

Yay.

I wonder if there's a simple way of testing whether the CONFIG_ thing
can *ever* be enabled. So detect if someone does

if (IS_ENABLED(CONFIG_BLOCKK))