All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] scripts: add no-warning option to the checkpatch script
@ 2010-12-15 17:17 Marco Stornelli
  2010-12-15 19:39 ` Thiago Farina
  0 siblings, 1 reply; 2+ messages in thread
From: Marco Stornelli @ 2010-12-15 17:17 UTC (permalink / raw)
  To: Linux Kernel; +Cc: apw

From: Marco Stornelli <marco.stornelli@gmail.com>

Add no-warning option to the checkpatch script.

Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
---

--- linux-2.6.36-orig/scripts/checkpatch.pl	2010-10-20 22:30:22.000000000 +0200
+++ linux-2.6.36/scripts/checkpatch.pl	2010-11-28 12:40:24.000000000 +0100
@@ -15,6 +15,7 @@ my $V = '0.30';
 use Getopt::Long qw(:config no_auto_abbrev);
 
 my $quiet = 0;
+my $chk_warn = 1;
 my $tree = 1;
 my $chk_signoff = 1;
 my $chk_patch = 1;
@@ -39,6 +40,7 @@ Version: $V
 
 Options:
   -q, --quiet                quiet
+  --no-warning               do not report warnings
   --no-tree                  run without a kernel tree
   --no-signoff               do not check for 'Signed-off-by' line
   --patch                    treat FILE as patchfile (default)
@@ -65,6 +67,7 @@ EOM
 
 GetOptions(
 	'q|quiet+'	=> \$quiet,
+	'warning!'	=> \$chk_warn,
 	'tree!'		=> \$tree,
 	'signoff!'	=> \$chk_signoff,
 	'patch!'	=> \$chk_patch,
@@ -1087,7 +1090,7 @@ sub ERROR {
 	}
 }
 sub WARN {
-	if (report("WARNING: $_[0]\n")) {
+	if ($chk_warn && report("WARNING: $_[0]\n")) {
 		our $clean = 0;
 		our $cnt_warn++;
 	}


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

* Re: [PATCH] scripts: add no-warning option to the checkpatch script
  2010-12-15 17:17 [PATCH] scripts: add no-warning option to the checkpatch script Marco Stornelli
@ 2010-12-15 19:39 ` Thiago Farina
  0 siblings, 0 replies; 2+ messages in thread
From: Thiago Farina @ 2010-12-15 19:39 UTC (permalink / raw)
  To: Marco Stornelli; +Cc: Linux Kernel, apw, Joe Perches

You probably wanted to copy Joe Perches too.

+Joe.

On Wed, Dec 15, 2010 at 3:17 PM, Marco Stornelli
<marco.stornelli@gmail.com> wrote:
> From: Marco Stornelli <marco.stornelli@gmail.com>
>
> Add no-warning option to the checkpatch script.
>
> Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
> ---
>
> --- linux-2.6.36-orig/scripts/checkpatch.pl     2010-10-20 22:30:22.000000000 +0200
> +++ linux-2.6.36/scripts/checkpatch.pl  2010-11-28 12:40:24.000000000 +0100
> @@ -15,6 +15,7 @@ my $V = '0.30';
>  use Getopt::Long qw(:config no_auto_abbrev);
>
>  my $quiet = 0;
> +my $chk_warn = 1;
>  my $tree = 1;
>  my $chk_signoff = 1;
>  my $chk_patch = 1;
> @@ -39,6 +40,7 @@ Version: $V
>
>  Options:
>   -q, --quiet                quiet
> +  --no-warning               do not report warnings
>   --no-tree                  run without a kernel tree
>   --no-signoff               do not check for 'Signed-off-by' line
>   --patch                    treat FILE as patchfile (default)
> @@ -65,6 +67,7 @@ EOM
>
>  GetOptions(
>        'q|quiet+'      => \$quiet,
> +       'warning!'      => \$chk_warn,
>        'tree!'         => \$tree,
>        'signoff!'      => \$chk_signoff,
>        'patch!'        => \$chk_patch,
> @@ -1087,7 +1090,7 @@ sub ERROR {
>        }
>  }
>  sub WARN {
> -       if (report("WARNING: $_[0]\n")) {
> +       if ($chk_warn && report("WARNING: $_[0]\n")) {
>                our $clean = 0;
>                our $cnt_warn++;
>        }
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
>

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

end of thread, other threads:[~2010-12-15 19:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-15 17:17 [PATCH] scripts: add no-warning option to the checkpatch script Marco Stornelli
2010-12-15 19:39 ` Thiago Farina

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.