Commit 327953e9 authored by Christoph Jaeger's avatar Christoph Jaeger Committed by Linus Torvalds

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.comSigned-off-by: default avatarChristoph Jaeger <cj@linux.com>
Suggested-by: default avatarDaniel Borkmann <dborkman@redhat.com>
Cc: Joe Perches <joe@perches.com>
Acked-by: default avatarPaul Bolle <pebolle@tiscali.nl>
Tested-by: default avatarPaul Bolle <pebolle@tiscali.nl>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent dcaf1123
...@@ -2357,6 +2357,13 @@ sub process { ...@@ -2357,6 +2357,13 @@ sub process {
"Use of CONFIG_EXPERIMENTAL is deprecated. For alternatives, see https://lkml.org/lkml/2012/10/23/580\n"); "Use of CONFIG_EXPERIMENTAL is deprecated. For alternatives, see https://lkml.org/lkml/2012/10/23/580\n");
} }
# discourage the use of boolean for type definition attributes of Kconfig options
if ($realfile =~ /Kconfig/ &&
$line =~ /^\+\s*\bboolean\b/) {
WARN("CONFIG_TYPE_BOOLEAN",
"Use of boolean is deprecated, please use bool instead.\n" . $herecurr);
}
if (($realfile =~ /Makefile.*/ || $realfile =~ /Kbuild.*/) && if (($realfile =~ /Makefile.*/ || $realfile =~ /Kbuild.*/) &&
($line =~ /\+(EXTRA_[A-Z]+FLAGS).*/)) { ($line =~ /\+(EXTRA_[A-Z]+FLAGS).*/)) {
my $flag = $1; my $flag = $1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment