From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-20.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 53AD9C433EF for ; Thu, 23 Sep 2021 13:30:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3B5806124F for ; Thu, 23 Sep 2021 13:30:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241461AbhIWNcC (ORCPT ); Thu, 23 Sep 2021 09:32:02 -0400 Received: from mail.kernel.org ([198.145.29.99]:44024 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232333AbhIWNbq (ORCPT ); Thu, 23 Sep 2021 09:31:46 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id B5DC66124F; Thu, 23 Sep 2021 13:30:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1632403814; bh=9rS4pUPSq3m5Xex2MyaSw0vSn3PD/pRn6qltbTyLvcU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lvb4/n7OO/x+Mf+Kzkbxn1vMfiRxRMpkMqJRIpdA22GNrY1z7lwoymqxTSCoCVxyS iw4dL3O9JmiF5bwFzr7DGrOzi8MgbP9S+Usq0kAlI22OBYBpLKEr7JU0psRwIJhdSP X1Wj3LbfW0OyqYP5Vjb3tqkZwUIUy6Xl5ggwYTFTHYnORcbzANb+NxS2q/KOJVfSVj cU3eLgvEnBPXb2jA2/aKVcq7JzCZ4zQgf0G6ELzsk2TqcUmmqOD3LupSjif8AGcxv3 GhGhA4Lgq1JffVUp1AgZKx79kzjrPUsUVNhNDRHDEWSoItCQCzCjVH56JChFJShzoa Z8yJGZb4ZCcZg== Received: by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1mTOnk-000ndn-NO; Thu, 23 Sep 2021 15:30:12 +0200 From: Mauro Carvalho Chehab To: Linux Doc Mailing List , Greg Kroah-Hartman Cc: Mauro Carvalho Chehab , "Jonathan Corbet" , linux-kernel@vger.kernel.org Subject: [PATCH 01/13] scripts: get_abi.pl: Better handle multiple What parameters Date: Thu, 23 Sep 2021 15:29:59 +0200 Message-Id: <9907e61130f9839a165d039ed434f28ec80cd031.1632402570.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: Mauro Carvalho Chehab Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- scripts/get_abi.pl | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/get_abi.pl b/scripts/get_abi.pl index d7aa82094296..48077feea89c 100755 --- a/scripts/get_abi.pl +++ b/scripts/get_abi.pl @@ -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; }; } @@ -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) { @@ -492,6 +492,7 @@ sub search_symbols { my $file = $data{$what}->{filepath}; + $what =~ s/\xac/, /g; my $bar = $what; $bar =~ s/./-/g; -- 2.31.1