From: Jani Nikula <jani.nikula@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, linux-kernel@vger.kernel.org
Cc: Andy Whitcroft <apw@canonical.com>, Joe Perches <joe@perches.com>,
intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] scripts/checkpatch: Check for Reviewed-by under --strict
Date: Fri, 28 Oct 2016 16:33:10 +0300 [thread overview]
Message-ID: <87y418k38p.fsf@intel.com> (raw)
In-Reply-To: <20161028124944.17930-1-chris@chris-wilson.co.uk>
On Fri, 28 Oct 2016, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> Some subsystem polices have a strict requirement that every patch must
> have at least one reviewer before being approved for upstream. Since
> encouraging review is good policy (great review is even better policy!)
> enforce checking for a Reviewed-by when checkpath is run with --strict
> (or with --review).
Hmm, do you imply the maintainer would have to add his Reviewed-by in
addition to Signed-off-by? I find that a bit too much (especially if you
intend to enforce this over at our corner of the kernel ;)
BR,
Jani.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Andy Whitcroft <apw@canonical.com>
> Cc: Joe Perches <joe@perches.com>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> ---
> scripts/checkpatch.pl | 17 ++++++++++++++++-
> 1 file changed, 16 insertions(+), 1 deletion(-)
>
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index a8368d1c4348..9eaa5a4fbbc0 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -21,6 +21,7 @@ use Getopt::Long qw(:config no_auto_abbrev);
> my $quiet = 0;
> my $tree = 1;
> my $chk_signoff = 1;
> +my $chk_review = 0;
> my $chk_patch = 1;
> my $tst_only;
> my $emacs = 0;
> @@ -69,6 +70,7 @@ Options:
> -q, --quiet quiet
> --no-tree run without a kernel tree
> --no-signoff do not check for 'Signed-off-by' line
> + --review check for 'Reviewed-by' line
> --patch treat FILE as patchfile (default)
> --emacs emacs compile window format
> --terse one line per report
> @@ -183,6 +185,7 @@ GetOptions(
> 'q|quiet+' => \$quiet,
> 'tree!' => \$tree,
> 'signoff!' => \$chk_signoff,
> + 'review!' => \$chk_review,
> 'patch!' => \$chk_patch,
> 'emacs!' => \$emacs,
> 'terse!' => \$terse,
> @@ -217,7 +220,7 @@ help(0) if ($help);
>
> list_types(0) if ($list_types);
>
> -$fix = 1 if ($fix_inplace);
> +$chk_review = 1 if ($check); # --strict implies checking for Reviewed-by
> $check_orig = $check;
>
> my $exit = 0;
> @@ -857,6 +860,7 @@ sub git_commit_info {
> }
>
> $chk_signoff = 0 if ($file);
> +$chk_review = 0 if ($file);
>
> my @rawlines = ();
> my @lines = ();
> @@ -2130,6 +2134,7 @@ sub process {
>
> our $clean = 1;
> my $signoff = 0;
> + my $review = 0;
> my $is_patch = 0;
> my $in_header_lines = $file ? 0 : 1;
> my $in_commit_log = 0; #Scanning lines before patch
> @@ -2400,6 +2405,12 @@ sub process {
> $in_commit_log = 0;
> }
>
> +# Check the patch for any review:
> + if ($line =~ /^\s*reviewed-by:/i) {
> + $review++;
> + $in_commit_log = 0;
> + }
> +
> # Check if MAINTAINERS is being updated. If so, there's probably no need to
> # emit the "does MAINTAINERS need updating?" message on file add/move/delete
> if ($line =~ /^\s*MAINTAINERS\s*\|/) {
> @@ -6204,6 +6215,10 @@ sub process {
> ERROR("MISSING_SIGN_OFF",
> "Missing Signed-off-by: line(s)\n");
> }
> + if ($is_patch && $has_commit_log && $chk_review && $review == 0) {
> + ERROR("MISSING_REVIEW",
> + "Missing Reviewed-by: line(s)\n");
> + }
>
> print report_dump();
> if ($summary && !($clean == 1 && $quiet == 1)) {
--
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
WARNING: multiple messages have this Message-ID (diff)
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, linux-kernel@vger.kernel.org
Cc: Andy Whitcroft <apw@canonical.com>, Joe Perches <joe@perches.com>,
intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH] scripts/checkpatch: Check for Reviewed-by under --strict
Date: Fri, 28 Oct 2016 16:33:10 +0300 [thread overview]
Message-ID: <87y418k38p.fsf@intel.com> (raw)
In-Reply-To: <20161028124944.17930-1-chris@chris-wilson.co.uk>
On Fri, 28 Oct 2016, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> Some subsystem polices have a strict requirement that every patch must
> have at least one reviewer before being approved for upstream. Since
> encouraging review is good policy (great review is even better policy!)
> enforce checking for a Reviewed-by when checkpath is run with --strict
> (or with --review).
Hmm, do you imply the maintainer would have to add his Reviewed-by in
addition to Signed-off-by? I find that a bit too much (especially if you
intend to enforce this over at our corner of the kernel ;)
BR,
Jani.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Andy Whitcroft <apw@canonical.com>
> Cc: Joe Perches <joe@perches.com>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> ---
> scripts/checkpatch.pl | 17 ++++++++++++++++-
> 1 file changed, 16 insertions(+), 1 deletion(-)
>
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index a8368d1c4348..9eaa5a4fbbc0 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -21,6 +21,7 @@ use Getopt::Long qw(:config no_auto_abbrev);
> my $quiet = 0;
> my $tree = 1;
> my $chk_signoff = 1;
> +my $chk_review = 0;
> my $chk_patch = 1;
> my $tst_only;
> my $emacs = 0;
> @@ -69,6 +70,7 @@ Options:
> -q, --quiet quiet
> --no-tree run without a kernel tree
> --no-signoff do not check for 'Signed-off-by' line
> + --review check for 'Reviewed-by' line
> --patch treat FILE as patchfile (default)
> --emacs emacs compile window format
> --terse one line per report
> @@ -183,6 +185,7 @@ GetOptions(
> 'q|quiet+' => \$quiet,
> 'tree!' => \$tree,
> 'signoff!' => \$chk_signoff,
> + 'review!' => \$chk_review,
> 'patch!' => \$chk_patch,
> 'emacs!' => \$emacs,
> 'terse!' => \$terse,
> @@ -217,7 +220,7 @@ help(0) if ($help);
>
> list_types(0) if ($list_types);
>
> -$fix = 1 if ($fix_inplace);
> +$chk_review = 1 if ($check); # --strict implies checking for Reviewed-by
> $check_orig = $check;
>
> my $exit = 0;
> @@ -857,6 +860,7 @@ sub git_commit_info {
> }
>
> $chk_signoff = 0 if ($file);
> +$chk_review = 0 if ($file);
>
> my @rawlines = ();
> my @lines = ();
> @@ -2130,6 +2134,7 @@ sub process {
>
> our $clean = 1;
> my $signoff = 0;
> + my $review = 0;
> my $is_patch = 0;
> my $in_header_lines = $file ? 0 : 1;
> my $in_commit_log = 0; #Scanning lines before patch
> @@ -2400,6 +2405,12 @@ sub process {
> $in_commit_log = 0;
> }
>
> +# Check the patch for any review:
> + if ($line =~ /^\s*reviewed-by:/i) {
> + $review++;
> + $in_commit_log = 0;
> + }
> +
> # Check if MAINTAINERS is being updated. If so, there's probably no need to
> # emit the "does MAINTAINERS need updating?" message on file add/move/delete
> if ($line =~ /^\s*MAINTAINERS\s*\|/) {
> @@ -6204,6 +6215,10 @@ sub process {
> ERROR("MISSING_SIGN_OFF",
> "Missing Signed-off-by: line(s)\n");
> }
> + if ($is_patch && $has_commit_log && $chk_review && $review == 0) {
> + ERROR("MISSING_REVIEW",
> + "Missing Reviewed-by: line(s)\n");
> + }
>
> print report_dump();
> if ($summary && !($clean == 1 && $quiet == 1)) {
--
Jani Nikula, Intel Open Source Technology Center
next prev parent reply other threads:[~2016-10-28 13:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-28 12:49 [PATCH] scripts/checkpatch: Check for Reviewed-by under --strict Chris Wilson
2016-10-28 13:33 ` Jani Nikula [this message]
2016-10-28 13:33 ` [Intel-gfx] " Jani Nikula
2016-10-28 14:02 ` Chris Wilson
2016-10-28 14:02 ` [Intel-gfx] " Chris Wilson
2016-10-28 13:45 ` ✗ Fi.CI.BAT: warning for " Patchwork
2016-10-28 14:57 ` [PATCH] " Joe Perches
2016-10-28 14:57 ` Joe Perches
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y418k38p.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=apw@canonical.com \
--cc=chris@chris-wilson.co.uk \
--cc=intel-gfx@lists.freedesktop.org \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.