Skip to content

Commit 327953e

Browse files
christophjaegertorvalds
authored andcommitted
checkpatch: add check for keyword 'boolean' in Kconfig definitions
Discourage the use of keyword 'boolean' for type definition attributes of config options as support for it will be dropped later on. See http://lkml.kernel.org/r/cover.1418003065.git.cj@linux.com Signed-off-by: Christoph Jaeger <cj@linux.com> Suggested-by: Daniel Borkmann <dborkman@redhat.com> Cc: Joe Perches <joe@perches.com> Acked-by: Paul Bolle <pebolle@tiscali.nl> Tested-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent dcaf112 commit 327953e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

scripts/checkpatch.pl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2357,6 +2357,13 @@ sub process {
23572357
"Use of CONFIG_EXPERIMENTAL is deprecated. For alternatives, see https://lkml.org/lkml/2012/10/23/580\n");
23582358
}
23592359

2360+
# discourage the use of boolean for type definition attributes of Kconfig options
2361+
if ($realfile =~ /Kconfig/ &&
2362+
$line =~ /^\+\s*\bboolean\b/) {
2363+
WARN("CONFIG_TYPE_BOOLEAN",
2364+
"Use of boolean is deprecated, please use bool instead.\n" . $herecurr);
2365+
}
2366+
23602367
if (($realfile =~ /Makefile.*/ || $realfile =~ /Kbuild.*/) &&
23612368
($line =~ /\+(EXTRA_[A-Z]+FLAGS).*/)) {
23622369
my $flag = $1;

0 commit comments

Comments
 (0)