]> git.baikalelectronics.ru Git - kernel.git/commit
checkpatch: add test for possible misuse of IS_ENABLED() without CONFIG_
authorJoe Perches <joe@perches.com>
Wed, 12 Aug 2020 01:35:07 +0000 (18:35 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 12 Aug 2020 17:58:00 +0000 (10:58 -0700)
commite54400f79ab17fc501779eda88116dafed063116
treef6a539ea3bf3c376554191c9b72961d21a7abfc9
parent8598ed3f3c414d5a0628070ffa0fe3607d2e5d16
checkpatch: add test for possible misuse of IS_ENABLED() without CONFIG_

IS_ENABLED is almost always used with CONFIG_<FOO> defines.

Add a test to verify that the #define being tested starts with CONFIG_.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
Link: http://lkml.kernel.org/r/e7fda760b91b769ba82844ba282d432c0d26d709.camel@perches.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
scripts/checkpatch.pl