* [PATCH] checkpatch: add check for keyword 'boolean' in Kconfig definitions
@ 2014-12-20 20:40 Christoph Jaeger
2014-12-20 20:49 ` Joe Perches
2015-01-05 23:16 ` Paul Bolle
0 siblings, 2 replies; 3+ messages in thread
From: Christoph Jaeger @ 2014-12-20 20:40 UTC (permalink / raw)
To: apw, joe; +Cc: linux-kernel, dborkman, pebolle, Christoph Jaeger
Discourage the use of keyword 'boolean' for type definition attributes of
config options as support for it will be dropped later on.
Reference: http://lkml.kernel.org/r/cover.1418003065.git.cj@linux.com
Suggested-by: Daniel Borkmann <dborkman@redhat.com>
Signed-off-by: Christoph Jaeger <cj@linux.com>
---
scripts/checkpatch.pl | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index f0bb6d6..cae974e 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2355,6 +2355,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;
--
2.1.0
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] checkpatch: add check for keyword 'boolean' in Kconfig definitions
2014-12-20 20:40 [PATCH] checkpatch: add check for keyword 'boolean' in Kconfig definitions Christoph Jaeger
@ 2014-12-20 20:49 ` Joe Perches
2015-01-05 23:16 ` Paul Bolle
1 sibling, 0 replies; 3+ messages in thread
From: Joe Perches @ 2014-12-20 20:49 UTC (permalink / raw)
To: Christoph Jaeger, Andrew Morton; +Cc: apw, linux-kernel, dborkman, pebolle
(adding Andrew Morton)
On Sat, 2014-12-20 at 15:40 -0500, Christoph Jaeger wrote:
> Discourage the use of keyword 'boolean' for type definition attributes of
> config options as support for it will be dropped later on.
>
> Reference: http://lkml.kernel.org/r/cover.1418003065.git.cj@linux.com
> Suggested-by: Daniel Borkmann <dborkman@redhat.com>
> Signed-off-by: Christoph Jaeger <cj@linux.com>
Seems sensible.
> ---
> scripts/checkpatch.pl | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index f0bb6d6..cae974e 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -2355,6 +2355,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;
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] checkpatch: add check for keyword 'boolean' in Kconfig definitions
2014-12-20 20:40 [PATCH] checkpatch: add check for keyword 'boolean' in Kconfig definitions Christoph Jaeger
2014-12-20 20:49 ` Joe Perches
@ 2015-01-05 23:16 ` Paul Bolle
1 sibling, 0 replies; 3+ messages in thread
From: Paul Bolle @ 2015-01-05 23:16 UTC (permalink / raw)
To: Christoph Jaeger; +Cc: apw, joe, linux-kernel, dborkman
On Sat, 2014-12-20 at 15:40 -0500, Christoph Jaeger wrote:
> Discourage the use of keyword 'boolean' for type definition attributes of
> config options as support for it will be dropped later on.
>
> Reference: http://lkml.kernel.org/r/cover.1418003065.git.cj@linux.com
> Suggested-by: Daniel Borkmann <dborkman@redhat.com>
> Signed-off-by: Christoph Jaeger <cj@linux.com>
Works as advertised:
$ scripts/checkpatch.pl -f kernel/livepatch/Kconfig
WARNING: Use of boolean is deprecated, please use bool instead.
#2: FILE: kernel/livepatch/Kconfig:2:
+ boolean
WARNING: Use of boolean is deprecated, please use bool instead.
#7: FILE: kernel/livepatch/Kconfig:7:
+ boolean "Kernel Live Patching"
total: 0 errors, 2 warnings, 18 lines checked
kernel/livepatch/Kconfig has style problems, please review.
If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
Acked-by: Paul Bolle <pebolle@tiscali.nl>
> ---
> scripts/checkpatch.pl | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index f0bb6d6..cae974e 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -2355,6 +2355,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",
This should become an error once "boolean" is removed (on some future
date).
> + "Use of boolean is deprecated, please use bool instead.\n" . $herecurr);
> + }
> +
> if (($realfile =~ /Makefile.*/ || $realfile =~ /Kbuild.*/) &&
> ($line =~ /\+(EXTRA_[A-Z]+FLAGS).*/)) {
> my $flag = $1;
Paul Bolle
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-01-05 23:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-20 20:40 [PATCH] checkpatch: add check for keyword 'boolean' in Kconfig definitions Christoph Jaeger
2014-12-20 20:49 ` Joe Perches
2015-01-05 23:16 ` Paul Bolle
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome