From f2a010fc8ef7fba505db1535797e11b176bdb0fd Mon Sep 17 00:00:00 2001 From: Quentin Young Date: Fri, 23 Feb 2018 10:11:19 -0500 Subject: [PATCH] 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 --- tools/checkpatch.pl | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/tools/checkpatch.pl b/tools/checkpatch.pl index 8477383469c9..c9472f5a0553 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,7 +4046,12 @@ sub process { # likely a typedef for a function. } elsif ($ctx =~ /$Type$/) { - } else { + # 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) && $fix) {