aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/checkpatch.pl15
1 files changed, 8 insertions, 7 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 54dfa2b543dd..a675f067b572 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -1573,13 +1573,14 @@ sub process {
1573 if (($line =~ /EXPORT_SYMBOL.*\((.*)\)/) || 1573 if (($line =~ /EXPORT_SYMBOL.*\((.*)\)/) ||
1574 ($line =~ /EXPORT_UNUSED_SYMBOL.*\((.*)\)/)) { 1574 ($line =~ /EXPORT_UNUSED_SYMBOL.*\((.*)\)/)) {
1575 my $name = $1; 1575 my $name = $1;
1576 if (($prevline !~ /^}/) && 1576 if ($prevline !~ /(?:
1577 ($prevline !~ /^\+}/) && 1577 ^.}|
1578 ($prevline !~ /^ }/) && 1578 ^.DEFINE_$Ident\(\Q$name\E\)|
1579 ($prevline !~ /^.DECLARE_$Ident\(\Q$name\E\)/) && 1579 ^.DECLARE_$Ident\(\Q$name\E\)|
1580 ($prevline !~ /^.LIST_HEAD\(\Q$name\E\)/) && 1580 ^.LIST_HEAD\(\Q$name\E\)|
1581 ($prevline !~ /^.$Type\s*\(\s*\*\s*\Q$name\E\s*\)\s*\(/) && 1581 ^.$Type\s*\(\s*\*\s*\Q$name\E\s*\)\s*\(|
1582 ($prevline !~ /\b\Q$name\E(?:\s+$Attribute)?\s*(?:;|=|\[)/)) { 1582 \b\Q$name\E(?:\s+$Attribute)?\s*(?:;|=|\[)
1583 )/x) {
1583 WARN("EXPORT_SYMBOL(foo); should immediately follow its function/variable\n" . $herecurr); 1584 WARN("EXPORT_SYMBOL(foo); should immediately follow its function/variable\n" . $herecurr);
1584 } 1585 }
1585 } 1586 }