]> git.sur5r.net Git - openocd/commitdiff
checkpatch.pl: check for the FSF mailing address
authorAntony Pavlov <antonynpavlov@gmail.com>
Fri, 10 Oct 2014 04:27:14 +0000 (08:27 +0400)
committerSpencer Oliver <spen@spen-soft.co.uk>
Mon, 24 Nov 2014 22:23:38 +0000 (22:23 +0000)
This check code is imported from Linux v3.17 checkpatch.pl.

Change-Id: If39d834ee9b6131bccc92de38fd7c108650bd2f1
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Reviewed-on: http://openocd.zylin.com/2341
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Tested-by: Spencer Oliver <spen@spen-soft.co.uk>
tools/scripts/checkpatch.pl

index 9cae83aeeea4b7955ca22884c16a05998c37cf08..b3a085483bc1156c46590b059ae5113dedc93fef 100755 (executable)
@@ -1631,6 +1631,14 @@ sub process {
                        $rpt_cleaners = 1;
                }
 
+               if ($rawline =~ /\bwrite to the Free/i ||
+                   $rawline =~ /\b59\s+Temple\s+Pl/i ||
+                   $rawline =~ /\b51\s+Franklin\s+St/i) {
+                       my $herevet = "$here\n" . cat_vet($rawline) . "\n";
+                       my $msg_type = \&ERROR;
+                       ERROR("Do not include the paragraph about writing to the Free Software Foundation's mailing address from the sample GPL notice. The FSF has changed addresses in the past, and may do so again. Linux already includes a copy of the GPL.\n" . $herevet)
+               }
+
 # check for Kconfig help text having a real description
 # Only applies when adding the entry originally, after that we do not have
 # sufficient context to determine whether it is indeed long enough.