Skip to content

Commit

Permalink
scripts: get_abi.pl: Better handle multiple What parameters
Browse files Browse the repository at this point in the history
Using a comma here is problematic, as some What: expressions
may already contain a comma. So, use \xac character instead.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Link: https://lore.kernel.org/r/e83e7ffaf3429f8dfca00d1d01653ecfa36f6119.1631957565.git.mchehab+huawei@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
mchehab authored and gregkh committed Sep 21, 2021
1 parent eb74c39 commit ab9c148
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scripts/get_abi.pl
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,12 @@ sub parse_abi {
push @{$symbols{$content}->{file}}, " $file:" . ($ln - 1);

if ($tag =~ m/what/) {
$what .= ", " . $content;
$what .= "\xac" . $content;
} else {
if ($what) {
parse_error($file, $ln, "What '$what' doesn't have a description", "") if (!$data{$what}->{description});

foreach my $w(split /, /, $what) {
foreach my $w(split /\xac/, $what) {
$symbols{$w}->{xref} = $what;
};
}
Expand Down Expand Up @@ -239,7 +239,7 @@ sub parse_abi {
if ($what) {
parse_error($file, $ln, "What '$what' doesn't have a description", "") if (!$data{$what}->{description});

foreach my $w(split /, /,$what) {
foreach my $w(split /\xac/,$what) {
$symbols{$w}->{xref} = $what;
};
}
Expand Down Expand Up @@ -328,7 +328,7 @@ sub output_rest {

printf ".. _%s:\n\n", $data{$what}->{label};

my @names = split /, /,$w;
my @names = split /\xac/,$w;
my $len = 0;

foreach my $name (@names) {
Expand Down

0 comments on commit ab9c148

Please sign in to comment.