checkpatch: add check for keyword 'boolean' in Kconfig definitions
authorChristoph Jaeger <[email protected]>
Fri, 13 Feb 2015 22:38:29 +0000 (14:38 -0800)
committerLinus Torvalds <[email protected]>
Sat, 14 Feb 2015 05:21:39 +0000 (21:21 -0800)
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[email protected]

Signed-off-by: Christoph Jaeger <[email protected]>
Suggested-by: Daniel Borkmann <[email protected]>
Cc: Joe Perches <[email protected]>
Acked-by: Paul Bolle <[email protected]>
Tested-by: Paul Bolle <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
scripts/checkpatch.pl

index f130c93a5656b23be023a563ce8b279cdd20daac..6afc24ba77a6b067941c7b1b1223fdbe33c05c6a 100755 (executable)
@@ -2357,6 +2357,13 @@ sub process {
                             "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.*/) &&
                    ($line =~ /\+(EXTRA_[A-Z]+FLAGS).*/)) {
                        my $flag = $1;