lkml.org 
[lkml]   [2016]   [Apr]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/3] checkpatch: add Kconfig 'default n' test
From
Date
On Thu, 2016-04-21 at 21:28 +0800, Yingjoe Chen wrote:
> If a Kconfig config option doesn't specify 'default', the default
> will be n. Adding 'default n' is unnecessary.
>
> Add a test to warn about this.
[]
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
[]
> @@ -2600,6 +2600,13 @@ sub process {
>        "Use of boolean is deprecated, please use bool instead.\n" . $herecurr);
>   }
>  
> +# discourage the use of default n
> + if ($realfile =~ /Kconfig/ &&
> +     $line =~ /^\+\s*\bdefault\b\s*n\s*$/) {

maybe line =~ /^\+\s*default\s+n/i

Also, there are some oddities like:

arch/mips/cavium-octeon/Kconfig:        default "n"

and a dozen or so uses like

default n if <foo>

\
 
 \ /
  Last update: 2016-04-21 19:41    [W:0.070 / U:11.512 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site