From 1d66f5289bbafed1c6f47a1d1a528519b05d3896 Mon Sep 17 00:00:00 2001 From: Andy Whitcroft Date: Tue, 26 Oct 2010 14:23:18 -0700 Subject: [PATCH] --- yaml --- r: 217594 b: refs/heads/master c: 3cbf62df3a8ce61cb1aa20b7dae964058988bfdd h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/scripts/checkpatch.pl | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 0533a3b4833a..b4022a3f3fca 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 5eaa20b984eb316533b4a098d8de3912e434df6a +refs/heads/master: 3cbf62df3a8ce61cb1aa20b7dae964058988bfdd diff --git a/trunk/scripts/checkpatch.pl b/trunk/scripts/checkpatch.pl index d5361e49abad..8ab45b72b396 100755 --- a/trunk/scripts/checkpatch.pl +++ b/trunk/scripts/checkpatch.pl @@ -1822,8 +1822,17 @@ sub process { !defined $suppress_export{$realline_next} && ($lines[$realline_next - 1] =~ /EXPORT_SYMBOL.*\((.*)\)/ || $lines[$realline_next - 1] =~ /EXPORT_UNUSED_SYMBOL.*\((.*)\)/)) { + # Handle definitions which produce identifiers with + # a prefix: + # XXX(foo); + # EXPORT_SYMBOL(something_foo); my $name = $1; - if ($stat !~ /(?: + if ($stat =~ /^.([A-Z_]+)\s*\(\s*($Ident)/ && + $name =~ /^${Ident}_$2/) { +#print "FOO C name<$name>\n"; + $suppress_export{$realline_next} = 1; + + } elsif ($stat !~ /(?: \n.}\s*$| ^.DEFINE_$Ident\(\Q$name\E\)| ^.DECLARE_$Ident\(\Q$name\E\)|