Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
[linux-2.6-microblaze.git] / scripts / get_abi.pl
index d32dcd7..6212f58 100755 (executable)
@@ -746,7 +746,7 @@ sub check_file($$)
        }
 
        if ($leave ne "others") {
-               my @expr = @{$leaf{$leave}->{expr}};
+               my @expr = @{$leaf{"others"}->{expr}};
                for (my $i = 0; $i < @names; $i++) {
                        foreach my $re (@expr) {
                                print STDERR "$names[$i] =~ /^$re\$/\n" if ($debug && $dbg_undefined);
@@ -842,8 +842,8 @@ sub undefined_symbols {
 
                        # Convert what into regular expressions
 
-                       $what =~ s,/\.\.\./,/*/,g;
-                       $what =~ s,\*,.*,g;
+                       # Escape dot characters
+                       $what =~ s/\./\xf6/g;
 
                        # Temporarily change [0-9]+ type of patterns
                        $what =~ s/\[0\-9\]\+/\xff/g;
@@ -859,6 +859,8 @@ sub undefined_symbols {
                        $what =~ s/[\{\<\[]([\w_]+)(?:[,|]+([\w_]+)){1,}[\}\>\]]/($1|$2)/g;
 
                        # Handle wildcards
+                       $what =~ s,\*,.*,g;
+                       $what =~ s,/\xf6..,/.*,g;
                        $what =~ s/\<[^\>]+\>/.*/g;
                        $what =~ s/\{[^\}]+\}/.*/g;
                        $what =~ s/\[[^\]]+\]/.*/g;
@@ -891,6 +893,13 @@ sub undefined_symbols {
                        # Special case: IIO ABI which a parenthesis.
                        $what =~ s/sqrt(.*)/sqrt\(.*\)/;
 
+                       # Simplify regexes with multiple .*
+                       $what =~ s#(?:\.\*){2,}##g;
+#                      $what =~ s#\.\*/\.\*#.*#g;
+
+                       # Recover dot characters
+                       $what =~ s/\xf6/\./g;
+
                        my $leave = get_leave($what);
 
                        my $added = 0;