summaryrefslogtreecommitdiffstats
path: root/tools/checkpatch.pl
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2018-02-23 16:11:19 +0100
committerQuentin Young <qlyoung@cumulusnetworks.com>2018-02-23 16:25:30 +0100
commit6f3835891a217af960c73366f6b635f65b256901 (patch)
tree0f379687a69b2999f32db88fc931ff6d4341998c /tools/checkpatch.pl
parenttools: improve checkpatch.sh (diff)
downloadfrr-6f3835891a217af960c73366f6b635f65b256901.tar.xz
frr-6f3835891a217af960c73366f6b635f65b256901.zip
tools: ignore FSF warning, fn macros in checkpatch
* Unlike Linux we do require the GPL file header * When checking for spaces between function names and parentheses, ignore all-uppercase function names as these are likely to be macros, and function-like macros may have that space Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'tools/checkpatch.pl')
-rwxr-xr-xtools/checkpatch.pl16
1 files changed, 4 insertions, 12 deletions
diff --git a/tools/checkpatch.pl b/tools/checkpatch.pl
index 847738346..fe771ebbb 100755
--- a/tools/checkpatch.pl
+++ b/tools/checkpatch.pl
@@ -2766,18 +2766,6 @@ sub process {
$rpt_cleaners = 1;
}
-# Check for FSF mailing addresses.
- if ($rawline =~ /\bwrite to the Free/i ||
- $rawline =~ /\b675\s+Mass\s+Ave/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_level = \&ERROR;
- $msg_level = \&CHK if ($file);
- &{$msg_level}("FSF_MAILING_ADDRESS",
- "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.
@@ -4058,6 +4046,10 @@ sub process {
# likely a typedef for a function.
} elsif ($ctx =~ /$Type$/) {
+ # All-uppercase function names are usually macros,
+ # ignore those
+ } elsif ($name eq uc $name) {
+
} else {
if (WARN("SPACING",
"space prohibited between function name and open parenthesis '('\n" . $herecurr) &&