Commit 70a11659 authored by Joe Perches's avatar Joe Perches Committed by Linus Torvalds

checkpatch: improve EXPORT_SYMBOL test for EXPORT_SYMBOL_NS uses

The EXPORT_SYMBOL test expects a single argument but definitions of
EXPORT_SYMBOL_NS have multiple arguments.

Update the test to extract only the first argument from any
EXPORT_SYMBOL related definition.

Link: https://lkml.kernel.org/r/9e8f251b42e405f460f26a23ba9b33ef45a94adc.camel@perches.comSigned-off-by: default avatarJoe Perches <joe@perches.com>
Reported-by: default avatarIan Pilcher <arequipeno@gmail.com>
Cc: Dwaipayan Ray <dwaipayanray1@gmail.com>
Cc: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 3e421469
...@@ -4449,6 +4449,7 @@ sub process { ...@@ -4449,6 +4449,7 @@ sub process {
# XXX(foo); # XXX(foo);
# EXPORT_SYMBOL(something_foo); # EXPORT_SYMBOL(something_foo);
my $name = $1; my $name = $1;
$name =~ s/^\s*($Ident).*/$1/;
if ($stat =~ /^(?:.\s*}\s*\n)?.([A-Z_]+)\s*\(\s*($Ident)/ && if ($stat =~ /^(?:.\s*}\s*\n)?.([A-Z_]+)\s*\(\s*($Ident)/ &&
$name =~ /^${Ident}_$2/) { $name =~ /^${Ident}_$2/) {
#print "FOO C name<$name>\n"; #print "FOO C name<$name>\n";
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment