summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorAntony Pavlov <antonynpavlov@gmail.com>2014-09-11 13:49:51 +0400
committerSascha Hauer <s.hauer@pengutronix.de>2014-09-12 07:38:37 +0200
commit767cd01face1b1bb244ad853070170a7d5bb2124 (patch)
tree6b05e0ca9620f77f901117826ffd87a28dacb626 /scripts
parent8e1314b890bf923da1dbddf513d8eb740b348eba (diff)
downloadbarebox-767cd01face1b1bb244ad853070170a7d5bb2124.tar.gz
barebox-767cd01face1b1bb244ad853070170a7d5bb2124.tar.xz
checkpatch.pl: check for the FSF mailing address
This check code is imported from Linux v3.16 checkpatch.pl. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/checkpatch.pl10
1 files changed, 10 insertions, 0 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 153af8dd82..419436dede 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -1425,6 +1425,16 @@ sub process {
$rpt_cleaners = 1;
}
+# Check for FSF mailing addresses.
+ 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;
+ $msg_type = \&CHK if ($file);
+ &{$msg_type}("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. barebox 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.