* [PATCH] scripts/checkpatch: Check for Reviewed-by under --strict
@ 2016-10-28 12:49 Chris Wilson
2016-10-28 13:33 ` [Intel-gfx] " Jani Nikula
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Chris Wilson @ 2016-10-28 12:49 UTC (permalink / raw)
To: linux-kernel
Cc: intel-gfx, Chris Wilson, Andy Whitcroft, Joe Perches,
Joonas Lahtinen
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).
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)) {
--
2.10.1
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [PATCH] scripts/checkpatch: Check for Reviewed-by under --strict
2016-10-28 12:49 [PATCH] scripts/checkpatch: Check for Reviewed-by under --strict Chris Wilson
@ 2016-10-28 13:33 ` Jani Nikula
2016-10-28 13:45 ` ✗ Fi.CI.BAT: warning for " Patchwork
2016-10-28 14:57 ` Joe Perches
2 siblings, 0 replies; 8+ messages in thread
From: Jani Nikula @ 2016-10-28 13:33 UTC (permalink / raw)
To: Chris Wilson, linux-kernel; +Cc: Andy Whitcroft, Joe Perches, intel-gfx
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
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [Intel-gfx] [PATCH] scripts/checkpatch: Check for Reviewed-by under --strict
@ 2016-10-28 13:33 ` Jani Nikula
0 siblings, 0 replies; 8+ messages in thread
From: Jani Nikula @ 2016-10-28 13:33 UTC (permalink / raw)
To: Chris Wilson, linux-kernel; +Cc: Andy Whitcroft, Joe Perches, intel-gfx
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
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH] scripts/checkpatch: Check for Reviewed-by under --strict
2016-10-28 13:33 ` [Intel-gfx] " Jani Nikula
@ 2016-10-28 14:02 ` Chris Wilson
-1 siblings, 0 replies; 8+ messages in thread
From: Chris Wilson @ 2016-10-28 14:02 UTC (permalink / raw)
To: Jani Nikula; +Cc: Andy Whitcroft, Joe Perches, intel-gfx, linux-kernel
On Fri, Oct 28, 2016 at 04:33:10PM +0300, Jani Nikula wrote:
> 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 ;)
I do believe we should be keeping the (our, my?) notion of review out of
the signed-off-by tag (which imo is a legal statement about the
provenance of a patch), and so yes we shouldn't be pushing patches that
haven't gone through the rite of fire and been seconded by someone else.
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Intel-gfx] [PATCH] scripts/checkpatch: Check for Reviewed-by under --strict
@ 2016-10-28 14:02 ` Chris Wilson
0 siblings, 0 replies; 8+ messages in thread
From: Chris Wilson @ 2016-10-28 14:02 UTC (permalink / raw)
To: Jani Nikula; +Cc: linux-kernel, Andy Whitcroft, Joe Perches, intel-gfx
On Fri, Oct 28, 2016 at 04:33:10PM +0300, Jani Nikula wrote:
> 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 ;)
I do believe we should be keeping the (our, my?) notion of review out of
the signed-off-by tag (which imo is a legal statement about the
provenance of a patch), and so yes we shouldn't be pushing patches that
haven't gone through the rite of fire and been seconded by someone else.
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 8+ messages in thread
* ✗ Fi.CI.BAT: warning for scripts/checkpatch: Check for Reviewed-by under --strict
2016-10-28 12:49 [PATCH] scripts/checkpatch: Check for Reviewed-by under --strict Chris Wilson
2016-10-28 13:33 ` [Intel-gfx] " Jani Nikula
@ 2016-10-28 13:45 ` Patchwork
2016-10-28 14:57 ` Joe Perches
2 siblings, 0 replies; 8+ messages in thread
From: Patchwork @ 2016-10-28 13:45 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
== Series Details ==
Series: scripts/checkpatch: Check for Reviewed-by under --strict
URL : https://patchwork.freedesktop.org/series/14529/
State : warning
== Summary ==
Series 14529v1 scripts/checkpatch: Check for Reviewed-by under --strict
https://patchwork.freedesktop.org/api/1.0/series/14529/revisions/1/mbox/
Test drv_module_reload_basic:
skip -> PASS (fi-skl-6260u)
Test kms_flip:
Subgroup basic-flip-vs-wf_vblank:
pass -> SKIP (fi-byt-n2820)
fi-bdw-5557u total:239 pass:224 dwarn:0 dfail:0 fail:0 skip:15
fi-bsw-n3050 total:239 pass:199 dwarn:0 dfail:0 fail:0 skip:40
fi-bxt-t5700 total:239 pass:211 dwarn:0 dfail:0 fail:0 skip:28
fi-byt-j1900 total:239 pass:211 dwarn:0 dfail:0 fail:0 skip:28
fi-byt-n2820 total:239 pass:206 dwarn:0 dfail:0 fail:0 skip:33
fi-hsw-4770 total:239 pass:219 dwarn:0 dfail:0 fail:0 skip:20
fi-hsw-4770r total:239 pass:218 dwarn:0 dfail:0 fail:0 skip:21
fi-ilk-650 total:239 pass:185 dwarn:0 dfail:0 fail:0 skip:54
fi-ivb-3520m total:239 pass:216 dwarn:0 dfail:0 fail:0 skip:23
fi-ivb-3770 total:239 pass:216 dwarn:0 dfail:0 fail:0 skip:23
fi-kbl-7200u total:239 pass:217 dwarn:0 dfail:0 fail:0 skip:22
fi-skl-6260u total:239 pass:225 dwarn:0 dfail:0 fail:0 skip:14
fi-skl-6700hq total:239 pass:218 dwarn:0 dfail:0 fail:0 skip:21
fi-skl-6700k total:239 pass:217 dwarn:1 dfail:0 fail:0 skip:21
fi-skl-6770hq total:239 pass:225 dwarn:0 dfail:0 fail:0 skip:14
fi-snb-2520m total:239 pass:206 dwarn:0 dfail:0 fail:0 skip:33
fi-snb-2600 total:239 pass:205 dwarn:0 dfail:0 fail:0 skip:34
c15686c36cae1cac4af0807213a9bb4bf79b8cdb drm-intel-nightly: 2016y-10m-28d-12h-29m-33s UTC integration manifest
03a5b8e scripts/checkpatch: Check for Reviewed-by under --strict
== Logs ==
For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_2849/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH] scripts/checkpatch: Check for Reviewed-by under --strict
2016-10-28 12:49 [PATCH] scripts/checkpatch: Check for Reviewed-by under --strict Chris Wilson
@ 2016-10-28 14:57 ` Joe Perches
2016-10-28 13:45 ` ✗ Fi.CI.BAT: warning for " Patchwork
2016-10-28 14:57 ` Joe Perches
2 siblings, 0 replies; 8+ messages in thread
From: Joe Perches @ 2016-10-28 14:57 UTC (permalink / raw)
To: Chris Wilson, linux-kernel; +Cc: Andy Whitcroft, intel-gfx
On Fri, 2016-10-28 at 13:49 +0100, Chris Wilson 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).
I rather dislike this as it imposes a rule outside
of what's documented in SubmittingPatches.
Ideally, please keep a private version of this.
And unless and until SubmittingPatches is updated,
please keep this separate from --strict.
> 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)) {
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH] scripts/checkpatch: Check for Reviewed-by under --strict
@ 2016-10-28 14:57 ` Joe Perches
0 siblings, 0 replies; 8+ messages in thread
From: Joe Perches @ 2016-10-28 14:57 UTC (permalink / raw)
To: Chris Wilson, linux-kernel; +Cc: intel-gfx, Andy Whitcroft, Joonas Lahtinen
On Fri, 2016-10-28 at 13:49 +0100, Chris Wilson 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).
I rather dislike this as it imposes a rule outside
of what's documented in SubmittingPatches.
Ideally, please keep a private version of this.
And unless and until SubmittingPatches is updated,
please keep this separate from --strict.
> 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)) {
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2016-10-28 14:58 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-28 12:49 [PATCH] scripts/checkpatch: Check for Reviewed-by under --strict Chris Wilson
2016-10-28 13:33 ` Jani Nikula
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
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.