mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH RESEND] checkpatch: remove obsolete CONFIG_EXPERIMENTAL checks
@ 2017-02-27 22:21 Ruslan Bilovol
  2017-02-27 22:23 ` Kees Cook
  2017-02-27 23:04 ` Joe Perches
  0 siblings, 2 replies; 4+ messages in thread
From: Ruslan Bilovol @ 2017-02-27 22:21 UTC (permalink / raw)
  To: apw, joe; +Cc: linux-kernel, keescook

Config EXPERIMENTAL has been removed from kernel in 2013
(see 3d374d0: "final removal of CONFIG_EXPERIMENTAL"),
there is no any reason to do these checks now.

Signed-off-by: Ruslan Bilovol <ruslan.bilovol@gmail.com>
---
 scripts/checkpatch.pl | 13 -------------
 1 file changed, 13 deletions(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 982c52c..e0a34e6 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2746,13 +2746,6 @@ sub process {
 			#print "is_start<$is_start> is_end<$is_end> length<$length>\n";
 		}
 
-# discourage the addition of CONFIG_EXPERIMENTAL in Kconfig.
-		if ($realfile =~ /Kconfig/ &&
-		    $line =~ /.\s*depends on\s+.*\bEXPERIMENTAL\b/) {
-			WARN("CONFIG_EXPERIMENTAL",
-			     "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/) {
@@ -3146,12 +3139,6 @@ sub process {
 			}
 		}
 
-# discourage the addition of CONFIG_EXPERIMENTAL in #if(def).
-		if ($line =~ /^\+\s*\#\s*if.*\bCONFIG_EXPERIMENTAL\b/) {
-			WARN("CONFIG_EXPERIMENTAL",
-			     "Use of CONFIG_EXPERIMENTAL is deprecated. For alternatives, see https://lkml.org/lkml/2012/10/23/580\n");
-		}
-
 # check for RCS/CVS revision markers
 		if ($rawline =~ /^\+.*\$(Revision|Log|Id)(?:\$|)/) {
 			WARN("CVS_KEYWORD",
-- 
1.9.1

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH RESEND] checkpatch: remove obsolete CONFIG_EXPERIMENTAL checks
  2017-02-27 22:21 [PATCH RESEND] checkpatch: remove obsolete CONFIG_EXPERIMENTAL checks Ruslan Bilovol
@ 2017-02-27 22:23 ` Kees Cook
  2017-02-27 23:04 ` Joe Perches
  1 sibling, 0 replies; 4+ messages in thread
From: Kees Cook @ 2017-02-27 22:23 UTC (permalink / raw)
  To: Ruslan Bilovol; +Cc: Andy Whitcroft, Joe Perches, LKML

On Mon, Feb 27, 2017 at 2:21 PM, Ruslan Bilovol
<ruslan.bilovol@gmail.com> wrote:
> Config EXPERIMENTAL has been removed from kernel in 2013
> (see 3d374d0: "final removal of CONFIG_EXPERIMENTAL"),
> there is no any reason to do these checks now.
>
> Signed-off-by: Ruslan Bilovol <ruslan.bilovol@gmail.com>

Acked-by: Kees Cook <keescook@chromium.org>

-Kees

> ---
>  scripts/checkpatch.pl | 13 -------------
>  1 file changed, 13 deletions(-)
>
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index 982c52c..e0a34e6 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -2746,13 +2746,6 @@ sub process {
>                         #print "is_start<$is_start> is_end<$is_end> length<$length>\n";
>                 }
>
> -# discourage the addition of CONFIG_EXPERIMENTAL in Kconfig.
> -               if ($realfile =~ /Kconfig/ &&
> -                   $line =~ /.\s*depends on\s+.*\bEXPERIMENTAL\b/) {
> -                       WARN("CONFIG_EXPERIMENTAL",
> -                            "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/) {
> @@ -3146,12 +3139,6 @@ sub process {
>                         }
>                 }
>
> -# discourage the addition of CONFIG_EXPERIMENTAL in #if(def).
> -               if ($line =~ /^\+\s*\#\s*if.*\bCONFIG_EXPERIMENTAL\b/) {
> -                       WARN("CONFIG_EXPERIMENTAL",
> -                            "Use of CONFIG_EXPERIMENTAL is deprecated. For alternatives, see https://lkml.org/lkml/2012/10/23/580\n");
> -               }
> -
>  # check for RCS/CVS revision markers
>                 if ($rawline =~ /^\+.*\$(Revision|Log|Id)(?:\$|)/) {
>                         WARN("CVS_KEYWORD",
> --
> 1.9.1
>



-- 
Kees Cook
Pixel Security

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH RESEND] checkpatch: remove obsolete CONFIG_EXPERIMENTAL checks
  2017-02-27 22:21 [PATCH RESEND] checkpatch: remove obsolete CONFIG_EXPERIMENTAL checks Ruslan Bilovol
  2017-02-27 22:23 ` Kees Cook
@ 2017-02-27 23:04 ` Joe Perches
  2017-03-09 21:57   ` Ruslan Bilovol
  1 sibling, 1 reply; 4+ messages in thread
From: Joe Perches @ 2017-02-27 23:04 UTC (permalink / raw)
  To: Ruslan Bilovol, apw, Andrew Morton; +Cc: linux-kernel, keescook

On Tue, 2017-02-28 at 00:21 +0200, Ruslan Bilovol wrote:
> Config EXPERIMENTAL has been removed from kernel in 2013
> (see 3d374d0: "final removal of CONFIG_EXPERIMENTAL"),
> there is no any reason to do these checks now.

> Signed-off-by: Ruslan Bilovol <ruslan.bilovol@gmail.com>

While I think all the defconfigs that have CONFIG_EXPERIMENTAL
should have those lines removed, this seems sensible enough.

$ git grep -w CONFIG_EXPERIMENTAL -- "*defconfig*" | wc -l
216

Acked-by: Joe Perches <joe@perches.com>

Here's a little script to remove the CONFIG_EXPERIMENTAL
lines from all the defconfigs too:

$ git grep -w --name-only CONFIG_EXPERIMENTAL -- "*defconfig*" | \
  xargs sed -i -e '/CONFIG_EXPERIMENTAL=[yn]/d'

> ---
>  scripts/checkpatch.pl | 13 -------------
>  1 file changed, 13 deletions(-)
> 
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index 982c52c..e0a34e6 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -2746,13 +2746,6 @@ sub process {
>  			#print "is_start<$is_start> is_end<$is_end> length<$length>\n";
>  		}
>  
> -# discourage the addition of CONFIG_EXPERIMENTAL in Kconfig.
> -		if ($realfile =~ /Kconfig/ &&
> -		    $line =~ /.\s*depends on\s+.*\bEXPERIMENTAL\b/) {
> -			WARN("CONFIG_EXPERIMENTAL",
> -			     "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/) {
> @@ -3146,12 +3139,6 @@ sub process {
>  			}
>  		}
>  
> -# discourage the addition of CONFIG_EXPERIMENTAL in #if(def).
> -		if ($line =~ /^\+\s*\#\s*if.*\bCONFIG_EXPERIMENTAL\b/) {
> -			WARN("CONFIG_EXPERIMENTAL",
> -			     "Use of CONFIG_EXPERIMENTAL is deprecated. For alternatives, see https://lkml.org/lkml/2012/10/23/580\n");
> -		}
> -
>  # check for RCS/CVS revision markers
>  		if ($rawline =~ /^\+.*\$(Revision|Log|Id)(?:\$|)/) {
>  			WARN("CVS_KEYWORD",

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH RESEND] checkpatch: remove obsolete CONFIG_EXPERIMENTAL checks
  2017-02-27 23:04 ` Joe Perches
@ 2017-03-09 21:57   ` Ruslan Bilovol
  0 siblings, 0 replies; 4+ messages in thread
From: Ruslan Bilovol @ 2017-03-09 21:57 UTC (permalink / raw)
  To: Joe Perches; +Cc: Robo Bot, Andrew Morton, linux-kernel, Kees Cook

On Tue, Feb 28, 2017 at 1:04 AM, Joe Perches <joe@perches.com> wrote:
> On Tue, 2017-02-28 at 00:21 +0200, Ruslan Bilovol wrote:
>> Config EXPERIMENTAL has been removed from kernel in 2013
>> (see 3d374d0: "final removal of CONFIG_EXPERIMENTAL"),
>> there is no any reason to do these checks now.
>
>> Signed-off-by: Ruslan Bilovol <ruslan.bilovol@gmail.com>
>
> While I think all the defconfigs that have CONFIG_EXPERIMENTAL
> should have those lines removed, this seems sensible enough.
>
> $ git grep -w CONFIG_EXPERIMENTAL -- "*defconfig*" | wc -l
> 216
>
> Acked-by: Joe Perches <joe@perches.com>
>
> Here's a little script to remove the CONFIG_EXPERIMENTAL
> lines from all the defconfigs too:
>
> $ git grep -w --name-only CONFIG_EXPERIMENTAL -- "*defconfig*" | \
>   xargs sed -i -e '/CONFIG_EXPERIMENTAL=[yn]/d'

While I originally wanted to remove CONFIG_EXPERIMENTAL from
all defconfigs by similar script, then automatically create patch, get
mainteiner for each defcofnig and send the patch to it, after doing
some investigation here I don't think it make sense.

First of all, I checked if there are any other non-existent config options
used in defconfigs (scripts/checkkconfigsymbols.py is very helpful
here) and I found there are many of them.

Below are just few of them (for kernel 4.10):

- RCU_CPU_STALL_DETECTOR: removed in 2011 by a00e0d71: "rcu:
  Remove conditional compilation for RCU CPU stall warnings", still
  present in *106* defconfigs

- NET_ETHERNET: removed in 2011 by f860b05: "drivers/net: Kconfig
  and Makefile cleanup", still present in *145* defconfigs

- MTD_CHAR: removed in 2013 by 660685d "mtd: merge mtdchar
  module with mtdcore", still present in *98* defconfigs

- INET_LRO removed in 2016 by 7bbf3ca "ipv4: Remove
  inet_lro library", still present in *192* defconfigs

- NETDEV_10000, NETDEV_1000, MTD_PARTITIONS,
  MISC_DEVICES, HID_SUPPORT, and more and more....

It seems nobody cares about presence of such non-existent
config symbols in defconfig files. Such defcifngs are
outdated and at least should be regenerated (instead of
sed-ding for each such config option)

Also presence of old non-existent config options in defconfigs
may be a good indication of systems that nobody uses
or supports, so it will be easy to indentify and remove them
from kernel at some time in the future.

So let's keep it as-is.

--
Ruslan

>
>> ---
>>  scripts/checkpatch.pl | 13 -------------
>>  1 file changed, 13 deletions(-)
>>
>> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
>> index 982c52c..e0a34e6 100755
>> --- a/scripts/checkpatch.pl
>> +++ b/scripts/checkpatch.pl
>> @@ -2746,13 +2746,6 @@ sub process {
>>                       #print "is_start<$is_start> is_end<$is_end> length<$length>\n";
>>               }
>>
>> -# discourage the addition of CONFIG_EXPERIMENTAL in Kconfig.
>> -             if ($realfile =~ /Kconfig/ &&
>> -                 $line =~ /.\s*depends on\s+.*\bEXPERIMENTAL\b/) {
>> -                     WARN("CONFIG_EXPERIMENTAL",
>> -                          "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/) {
>> @@ -3146,12 +3139,6 @@ sub process {
>>                       }
>>               }
>>
>> -# discourage the addition of CONFIG_EXPERIMENTAL in #if(def).
>> -             if ($line =~ /^\+\s*\#\s*if.*\bCONFIG_EXPERIMENTAL\b/) {
>> -                     WARN("CONFIG_EXPERIMENTAL",
>> -                          "Use of CONFIG_EXPERIMENTAL is deprecated. For alternatives, see https://lkml.org/lkml/2012/10/23/580\n");
>> -             }
>> -
>>  # check for RCS/CVS revision markers
>>               if ($rawline =~ /^\+.*\$(Revision|Log|Id)(?:\$|)/) {
>>                       WARN("CVS_KEYWORD",

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-03-09 21:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-27 22:21 [PATCH RESEND] checkpatch: remove obsolete CONFIG_EXPERIMENTAL checks Ruslan Bilovol
2017-02-27 22:23 ` Kees Cook
2017-02-27 23:04 ` Joe Perches
2017-03-09 21:57   ` Ruslan Bilovol

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®