Re: [PATCH v2] docs: Clarify the usage and sign-off requirements for Co-developed-by

From: Joe Perches
Date: Thu Mar 21 2019 - 18:47:32 EST


On Thu, 2019-03-21 at 12:23 -0700, Sean Christopherson wrote:
> On Thu, Mar 21, 2019 at 11:43:16AM -0700, Sean Christopherson wrote:
> > The documentation for Co-developed-by is a bit light on details, e.g. it
> > doesn't explicitly state that:
> >
> > - Multiple Co-developed-by tags are perfectly acceptable
> > - Co-developed-by and Signed-off-by must be paired together
> > - SOB ordering should still follow standard sign-off procedure

While I still think co-developed-by: is unnecessary and
almost none of the existing uses of this have this
sequence of "Co-developed-by: <name/email>" followed directly
by "Signed-off-by: <same name/email>", here's a possible
checkpatch addition for it.

---
scripts/checkpatch.pl | 9 +++++++++
1 file changed, 9 insertions(+)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index d0001fd1112d..e938fd56cc20 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2687,6 +2687,15 @@ sub process {
} else {
$signatures{$sig_nospace} = 1;
}
+
+# Check Co-developed-by: suceeded by Signed-off-by: with same name and email
+ if ($sign_off =~ /^signed-off-by:$/i &&
+ $linenr > 1 &&
+ $rawlines[$linenr - 2] =~ /^\s*co-developed-by:\s*(.*)/i &&
+ $1 ne $email) {
+ WARN("BAD_SIGN_OFF",
+ "Co-developed-by: should be suceeded by Signed-off-by: with same name/email\n" . "$here\n" . $rawlines[$linenr - 2] . "\n" . $rawline);
+ }
}

# Check email subject for common tools that don't need to be mentioned