summaryrefslogtreecommitdiff
path: root/scripts/get_abi.pl
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>2021-09-23 18:41:17 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-09-23 19:45:08 +0300
commitcb06b8ddeb4790cb6caf744316ebea99d53996ee (patch)
tree6c36adc1fc1d0a48b8ed3936310fb14384d138a3 /scripts/get_abi.pl
parent0cd9e25b08132bb275fb5c1e753d3f13abfeb463 (diff)
downloadlinux-cb06b8ddeb4790cb6caf744316ebea99d53996ee.tar.xz
scripts: get_abi.pl: stop check loop earlier when regex is found
Right now, there are two loops used to seek for a regex. Make sure that both will be skip when a match is found. While here, drop the unused $defined variable. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Link: https://lore.kernel.org/r/2ba722d2cdbe7c7d0f1d1b58d350052576d1d703.1632411447.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts/get_abi.pl')
-rwxr-xr-xscripts/get_abi.pl7
1 files changed, 2 insertions, 5 deletions
diff --git a/scripts/get_abi.pl b/scripts/get_abi.pl
index 42eb16eb78e9..d45e5ba56f9c 100755
--- a/scripts/get_abi.pl
+++ b/scripts/get_abi.pl
@@ -685,7 +685,6 @@ sub check_undefined_symbols {
my @names = @{$$file_ref{"__name"}};
my $file = $names[0];
- my $defined = 0;
my $exact = 0;
my $found_string;
@@ -711,13 +710,11 @@ sub check_undefined_symbols {
last;
}
}
+ last if ($exact);
}
-
- $defined++;
-
next if ($exact);
- if ($hint && $defined && (!$search_string || $found_string)) {
+ if ($hint && (!$search_string || $found_string)) {
$what =~ s/\xac/\n\t/g;
if ($leave ne "others") {
print " more likely regexes:\n\t$what\n";