diff options
author | Joe Perches <[email protected]> | 2021-11-08 18:33:31 -0800 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2021-11-09 10:02:50 -0800 |
commit | 70a11659f590b6ac32e6260d5c64a3e83b1272d4 (patch) | |
tree | df4c3ac67bbc130ff933873c41af8e790e65a9ad | |
parent | 3e421469dd77ebbe7d5403827ecd5a74bcbcbb0a (diff) |
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/[email protected]
Signed-off-by: Joe Perches <[email protected]>
Reported-by: Ian Pilcher <[email protected]>
Cc: Dwaipayan Ray <[email protected]>
Cc: Lukas Bulwahn <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
-rwxr-xr-x | scripts/checkpatch.pl | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 88cb294dc447..91798b07c6cb 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -4449,6 +4449,7 @@ sub process { # XXX(foo); # EXPORT_SYMBOL(something_foo); my $name = $1; + $name =~ s/^\s*($Ident).*/$1/; if ($stat =~ /^(?:.\s*}\s*\n)?.([A-Z_]+)\s*\(\s*($Ident)/ && $name =~ /^${Ident}_$2/) { #print "FOO C name<$name>\n"; |