]> git.puffer.fish Git - mirror/frr.git/commitdiff
tools: ignore FSF warning, fn macros in checkpatch
authorQuentin Young <qlyoung@cumulusnetworks.com>
Fri, 23 Feb 2018 15:11:19 +0000 (10:11 -0500)
committerQuentin Young <qlyoung@cumulusnetworks.com>
Fri, 23 Feb 2018 15:25:30 +0000 (10:25 -0500)
* 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>
tools/checkpatch.pl

index 8477383469c984a06b95ffc6de866fd0dd890040..fe771ebbba6ed37aaf7a8f54ae38a172df39c247 100755 (executable)
@@ -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) &&