lkml.org 
[lkml]   [2021]   [Sep]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2 1/5] scripts: get_abi.pl: Better handle multiple What parameters
Date
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>
---
scripts/get_abi.pl | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/scripts/get_abi.pl b/scripts/get_abi.pl
index d7aa82094296..3b25d0a855ad 100755
--- a/scripts/get_abi.pl
+++ b/scripts/get_abi.pl
@@ -129,7 +129,7 @@ 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});
@@ -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;
};
}
@@ -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) {
--
2.31.1
\
 
 \ /
  Last update: 2021-09-14 16:46    [W:0.037 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site