Re: [PATCH] scripts: add no-warning option to the checkpatch script

From: Thiago Farina
Date: Wed Dec 15 2010 - 14:40:00 EST


You probably wanted to copy Joe Perches too.

+Joe.

On Wed, Dec 15, 2010 at 3:17 PM, Marco Stornelli
<marco.stornelli@xxxxxxxxx> wrote:
> From: Marco Stornelli <marco.stornelli@xxxxxxxxx>
>
> Add no-warning option to the checkpatch script.
>
> Signed-off-by: Marco Stornelli <marco.stornelli@xxxxxxxxx>
> ---
>
> --- 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@xxxxxxxxxxxxxxx
> More majordomo info at Âhttp://vger.kernel.org/majordomo-info.html
> Please read the FAQ at Âhttp://www.tux.org/lkml/
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/