diff mbox series

[2/2] checkpatch: add Co-developed-by to signature tags

Message ID 1544808928-20002-3-git-send-email-jorge.ramirez-ortiz@linaro.org
State New
Headers show
Series Fix Co-Developed-by | expand

Commit Message

Jorge Ramirez-Ortiz Dec. 14, 2018, 5:35 p.m. UTC
As per Documentation/process/submitting-patches, Co-developed-by is a
valid signature.

This commit removes the warning.

Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>

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

-- 
2.7.4

Comments

Andrew Morton Dec. 14, 2018, 8:16 p.m. UTC | #1
On Fri, 14 Dec 2018 18:35:28 +0100 Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org> wrote:

> As per Documentation/process/submitting-patches, Co-developed-by is a

> valid signature.

> 


I'm with Joe - I find this tag kinda useless and duplicative.  But whatever.

But as the documentation says, Co-developed-by must be accompanied by a
Signed-off-by:.  It would be helpful if checkpatch were to detect a
failure to do this.
Himanshu Jha Dec. 14, 2018, 8:58 p.m. UTC | #2
On Fri, Dec 14, 2018 at 12:16:34PM -0800, Andrew Morton wrote:
> On Fri, 14 Dec 2018 18:35:28 +0100 Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org> wrote:

> 

> > As per Documentation/process/submitting-patches, Co-developed-by is a

> > valid signature.

> > 

> 

> I'm with Joe - I find this tag kinda useless and duplicative.  But whatever.


I'm fine either way, just the problem is:

	Co-developed-by Vs Co-Developed-by

with checkpatch spitting out that it is not a valid signature.

In the end, I can completely remove the tag from docs if it is useless
and duplicative.

-- 
Himanshu Jha
Undergraduate Student
Department of Electronics & Communication
Guru Tegh Bahadur Institute of Technology
Joe Perches Dec. 15, 2018, 5:45 p.m. UTC | #3
On Fri, 2018-12-14 at 12:16 -0800, Andrew Morton wrote:
> On Fri, 14 Dec 2018 18:35:28 +0100 Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org> wrote:

> 

> > As per Documentation/process/submitting-patches, Co-developed-by is a

> > valid signature.

> > 

> 

> I'm with Joe - I find this tag kinda useless and duplicative.  But whatever.

> 

> But as the documentation says, Co-developed-by must be accompanied by a

> Signed-off-by:.  It would be helpful if checkpatch were to detect a

> failure to do this.


perhaps
---
 scripts/checkpatch.pl | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 93e84c9504a1..056d4b47ffaf 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2673,7 +2673,20 @@ sub process {
 				WARN("BAD_SIGN_OFF",
 				     "Duplicate signature\n" . $herecurr);
 			} else {
-				$signatures{$sig_nospace} = 1;
+				$signatures{$sig_nospace} = $herecurr;
+			}
+		}
+
+# Check for "Co-developed-by:" uses without equivalent "Signed-off-by:"
+# $signatures keys are all lower case without spaces
+		if ($rawline =~ /^---$/) {
+			foreach my $sig (keys %signatures) {
+				next if ($sig !~ /^co-developed-by:(.*)/);
+				my $signer = $1;
+				if (!defined $signatures{"signed-off-by:$signer"}) {
+					WARN("CODEVELOPED_WITHOUT_SIGNOFF",
+					     "Co-developed-by: used without Signed-off-by: by same person\n" . $signatures{$sig});
+				}
 			}
 		}
diff mbox series

Patch

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 93e84c9..b737ca9 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -468,6 +468,7 @@  our $logFunctions = qr{(?x:
 
 our $signature_tags = qr{(?xi:
 	Signed-off-by:|
+	Co-developed-by:|
 	Acked-by:|
 	Tested-by:|
 	Reviewed-by:|