]> git.baikalelectronics.ru Git - kernel.git/commit
checkpatch: add PREFER_IS_ENABLED test
authorJoe Perches <joe@perches.com>
Sat, 21 May 2016 00:04:00 +0000 (17:04 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 21 May 2016 00:58:30 +0000 (17:58 -0700)
commitfd9bd7bf37a9a7e9a5d2bd9b473bd54059f701d5
tree94c06449f8c37ad6ae82ce58c45c38fb7eebb004
parent9b54d3cb2146c72c4f3ace22fb8cd76f37d29800
checkpatch: add PREFER_IS_ENABLED test

Using #if defined CONFIG_<FOO> || defined CONFIG_<FOO>_MODULE is
more verbose than necessary and IS_ENABLED(CONFIG_<FOO>) is preferred.

So add a test and a message for it.

--fix it to if desired.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
scripts/checkpatch.pl