Merge tag 'socfpga_arm32_defconfig_for_v5.2' of git://git.kernel.org/pub/scm/linux...
[linux-2.6-block.git] / scripts / checkpatch.pl
index a09333fd7cef81053bf204dd03a4db07bbb833ef..bb28b178d92950ccd1435ff693d108869c0f037d 100755 (executable)
@@ -2687,6 +2687,24 @@ sub process {
                        } else {
                                $signatures{$sig_nospace} = 1;
                        }
+
+# Check Co-developed-by: immediately followed by Signed-off-by: with same name and email
+                       if ($sign_off =~ /^co-developed-by:$/i) {
+                               if ($email eq $author) {
+                                       WARN("BAD_SIGN_OFF",
+                                             "Co-developed-by: should not be used to attribute nominal patch author '$author'\n" . "$here\n" . $rawline);
+                               }
+                               if (!defined $lines[$linenr]) {
+                                       WARN("BAD_SIGN_OFF",
+                                             "Co-developed-by: must be immediately followed by Signed-off-by:\n" . "$here\n" . $rawline);
+                               } elsif ($rawlines[$linenr] !~ /^\s*signed-off-by:\s*(.*)/i) {
+                                       WARN("BAD_SIGN_OFF",
+                                            "Co-developed-by: must be immediately followed by Signed-off-by:\n" . "$here\n" . $rawline . "\n" .$rawlines[$linenr]);
+                               } elsif ($1 ne $email) {
+                                       WARN("BAD_SIGN_OFF",
+                                            "Co-developed-by and Signed-off-by: name/email do not match \n" . "$here\n" . $rawline . "\n" .$rawlines[$linenr]);
+                               }
+                       }
                }
 
 # Check email subject for common tools that don't need to be mentioned