Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp244209pxb; Thu, 30 Sep 2021 05:17:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx9eg3wAXNVb93+8NwoBl18C77NoZFWWZ4W4UKRjKfoEP1MqR4goFJ25tF9vUFQnzmgiVZ3 X-Received: by 2002:a17:906:7047:: with SMTP id r7mr6281515ejj.342.1633004238096; Thu, 30 Sep 2021 05:17:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633004238; cv=none; d=google.com; s=arc-20160816; b=PejfjQyNJCusj+4Zzcnd0eXR8wrBysaiZTVOWqfcypupc5WCnUerTMN3N0AKYtKxGO jBSSpp9RkUphFgCXafAFaWnU13uXksdv1Eiop8Kk9SJIqH1vkYE7lB7wIsmQmqkZHD2Z TnR+SmD59TSooMzX7L2hEJhca08MDcUSbOUeFgdHm/3x1Vav5lT42mq7YIA8FsBSj+6M pa2ZmuQQVV5TSNcgq2N5LdSVsxmBXiAlNF5LEenpl/6Ke8fPWk7GufgpYD5En/fMmBfp qIuOABz55JiRV5IBDUz64Ev3f1+tBAKbkv16Cel1opWBIPyYPD86T8VyjmgvzxkAV6vf rUaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=m+h4Sm6REm7kioXtImgMdLtA369aJZa4AxoItAgFCvs=; b=hDvMCjOodz1J5ksQnS86w0rRY7FkD6DYTid9+mdZvlzLERMSZ01mJ31ZvafNAwiFNR P1jF4KFMWvokT61CixX25EkiKR7P//RvMHds3JypfTU38owRO+kYee7+wjBHadUxjaXx MAkfHHFfoE+LOA84hkDGBRV7SO2z814pcHmmr5AWdZU8NwKAdvDomZA3U81n9fKeZnBQ isZTZpDXfZ4bfq8kCajid5lon/tIeQhAEzAES2GSqq7E9QkMCCKYrGRTmqxyeDMA7u5B IhaYxJEf0Rl16t28LpZLmxpbjbKKeeIo0eIuWKHhbF7wV0cwk9PhbPM3ekD7wdIQhluJ sN3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="DODIksv/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 2si3301062ejl.713.2021.09.30.05.16.50; Thu, 30 Sep 2021 05:17:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="DODIksv/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349483AbhI3Jlt (ORCPT + 99 others); Thu, 30 Sep 2021 05:41:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:41016 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349419AbhI3Jls (ORCPT ); Thu, 30 Sep 2021 05:41:48 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id BA41961278; Thu, 30 Sep 2021 09:40:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1632994805; bh=1Vw8fcSkpK0woRsf4e90wZNiyBVuq6lfsSSLZttvsxU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DODIksv/T6GvyDDqFGESqqh1R7Ir0hr+FKy3+OskLFDV8rhKYKaR8sEoA2uxFML+1 QvccjfbuIGfEQplIhDhD5H+hsIO3Slj7Zz+ClF12vvhDHOSAJv+hKHwutkjAdmbDND 8kmJJpGQlfKNushXrWc1NX2vA3GUBJ7Py1b4/QyvKzvlpxOgmEPpGNC3EUVKcGV7h2 VGNmWVhsEXBkO71y6nf0iKyhAfOuQAY50vJCcW147NnuousmFJsxr9e/EG39baMQBB t3bddTBd5yiR0EoSCOiGNiRhvLmDphniSjRRWgMbp1IHDZtXxglr7E2fAG7chyA+U9 yLhGeKTRAV/9g== Received: by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1mVsXr-002AEz-MK; Thu, 30 Sep 2021 11:40:03 +0200 From: Mauro Carvalho Chehab To: Greg Kroah-Hartman , Linux Doc Mailing List Cc: Mauro Carvalho Chehab , "Jonathan Corbet" , linux-kernel@vger.kernel.org Subject: [PATCH 2/2] scripts: get_abi.pl: better generate regex from what fields Date: Thu, 30 Sep 2021 11:40:00 +0200 Message-Id: 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 repeating sequencies of .* seem to slow down the processing speed on some cases. Also, currently, a "." character is not properly handled as such. Change the way regexes are created, in order to produce better search expressions. Signed-off-by: Mauro Carvalho Chehab --- To mailbombing on a large number of people, only mailing lists were C/C on the cover. See [PATCH 0/2] at: https://lore.kernel.org/all/cover.1632994565.git.mchehab+huawei@kernel.org/ scripts/get_abi.pl | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/scripts/get_abi.pl b/scripts/get_abi.pl index 2f3674bb3c9e..6212f58b69c6 100755 --- a/scripts/get_abi.pl +++ b/scripts/get_abi.pl @@ -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; -- 2.31.1