Commit 92635894 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab Committed by Greg Kroah-Hartman

scripts: get_abi.pl: Better handle leaves with wildcards

When the the leaf of a regex ends with a wildcard, the speedup
algorithm to reduce the number of regexes to seek won't work.

So, when those are found, place at the "others" exception.

That slows down the search from 0.14s to 1 minute on my
machine, but the results are a lot more consistent.
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Link: https://lore.kernel.org/r/60bb97cf337333783f9f52e114b896439e9cc215.1632411447.git.mchehab+huawei@kernel.orgSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 46f661fd
......@@ -665,7 +665,7 @@ sub get_leave($)
# However, there are a few occurences where the leave is
# either a wildcard or a number. Just group such cases
# altogether.
if ($leave =~ m/^\.\*/ || $leave eq "" || $leave =~ /^\d+$/) {
if ($leave =~ m/\.\*/ || $leave eq "" || $leave =~ /\\d/) {
$leave = "others";
}
......
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