Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp579021pxb; Thu, 23 Sep 2021 06:34:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwPkF1cr87C0PDBa8oLIhg+JsNiSIXzHgAIRcWECzdAo0p8Spq27RjuygfR0+CxC1G6P7M4 X-Received: by 2002:a17:907:98a5:: with SMTP id ju5mr4814706ejc.378.1632404090860; Thu, 23 Sep 2021 06:34:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632404090; cv=none; d=google.com; s=arc-20160816; b=SeUE4SsUkZner1AwBElJGAam+0wHmM7WR2cjdiHHYVob+bnrbC9QxkX6dzzTNejaLh D+cDGEP84tig176ZsTjey8KrkgPPXEcp1suD/zeftTbLMIg7p2FlAATdAwXwGxWtIbuN X/cUZJma7eWZoZ+m4RBsoURR5YOLjpOv0YROAopIktYBA6VYNY/QyA4bMn+YXXWR1zfR CPj0uvoVLXImkw0AZiQd0oVMiZ1ffFo+3Zd55YOUEKNtCzdLRq4uww+vYjZSkbKi/HIy WJbCG1CatA2eIROkSXyA7U9I6ftIkP/90H0yvbNESu5tcoqE5cja/X+vI8544iD1qkB8 thgA== 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=VpF52wPSaePO/L2OnWBsOhbqWO6Tb3TYiDG9lxOpoQ0=; b=QUAGjIOTqyHj0D9jr23XOHV6bV7AIvjWQIXS831FFA+Hj1sqwxFGzK6J7mbvL87mNt wewzRiG7u3WdhVgcbeFxePWwPSpOcAy+ncUDHhQ3qo0cETWWUChHyYKZVsJUZeOyf+Q+ HSoh7oD+trbo6zY+7BnNseUub4O3H3MTV9udFvH+feLaiyFcd9TS/AJH1z6cS1W8d1hJ Peg8zs1ndXNvoSSbJiz7YsyxFVir6pOZvw5QrssI2wqUP/NNhwHAnzrpUT3vtIIG0Ezb CjftKG3Cc7aaPB8ZbzxvgoqTQWxjwT8wqLArLaOrDrsJhGbFiKBbLWRs8Bb9UDOz2Ex6 AI5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=E8GthFpd; 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 q5si6770957edh.492.2021.09.23.06.34.26; Thu, 23 Sep 2021 06:34:50 -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=E8GthFpd; 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 S241524AbhIWNcQ (ORCPT + 99 others); Thu, 23 Sep 2021 09:32:16 -0400 Received: from mail.kernel.org ([198.145.29.99]:44108 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241244AbhIWNbq (ORCPT ); Thu, 23 Sep 2021 09:31:46 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D5F5C6128B; 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=hs9wTebXbUtpLtghXzenefspd1+uQbrHJz31wpQPqxQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=E8GthFpdk9q0rCP/99lM0cJOaBiu40Df+54pfjnrTmvBLmacK9wYo5fTI+vRtwoSX JVmgpbJWXnK36ErAsZWFMGrIZYVaQ/j/8RUiBMSxWjkTk7I85t7w/9dIrmXOyAOk/h vh/hF9JsMivy5m+zA6bdNcD1VnFTDj5IQXasdimSxk8RBD/e9RGmqJB68vOVEzzyun cTe8DBZEpjVmRzegBR6Z1A7yAc3BICRbRnbALTcIlWTIQZ+a4LGztGFU7lnNqlezJ9 1nrbVramlcZg604bfeTs7gws8m0Sd7V6CxE0FsF9byiGgURNFx6dfhSVodGQzXpm/d teb6Utp0kba3Q== Received: by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1mTOnl-000nec-58; Thu, 23 Sep 2021 15:30:13 +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 13/13] scripts: get_abi.pl: ensure that "others" regex will be parsed Date: Thu, 23 Sep 2021 15:30:11 +0200 Message-Id: <3b61e86b5b2b9cd8d4b6a118f34e007f6aa64406.1632402570.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: Mauro Carvalho Chehab Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The way the search algorithm works is that reduces the number of regex expressions that will be checked for a given file entry at sysfs. It does that by looking at the devnode name. For instance, when it checks for this file: /sys/bus/pci/drivers/iosf_mbi_pci/bind The logic will seek only the "What:" expressions that end with "bind". Currently, there are just a couple of What expressions that matches it: What: /sys/bus/fsl\-mc/drivers/.*/bind What: /sys/bus/pci/drivers/.*/bind It will then run an O(n²) algorithm to seek, which runs quickly when there are few regexs to seek. There are, however, some What: expressions that end with a wildcard. Those are harder to process. Right now, they're all grouped together at the "others" group. As those don't depend on the basename of the node, add an extra loop to ensure that those will be processed at the end, if not done yet. Signed-off-by: Mauro Carvalho Chehab --- scripts/get_abi.pl | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/scripts/get_abi.pl b/scripts/get_abi.pl index f2b5efef9c30..f25c98b1971e 100755 --- a/scripts/get_abi.pl +++ b/scripts/get_abi.pl @@ -723,6 +723,22 @@ sub check_undefined_symbols { } next if ($exact); + if ($leave ne "others") { + my @expr = @{$leaf{$leave}->{expr}}; + for (my $i = 0; $i < @names; $i++) { + foreach my $re (@expr) { + print "$names[$i] =~ /^$re\$/\n" if ($debug && $dbg_undefined); + if ($names[$i] =~ $re) { + $exact = 1; + last; + } + } + last if ($exact); + } + last if ($exact); + } + next if ($exact); + if ($hint && (!$search_string || $found_string)) { my $what = $leaf{$leave}->{what}; $what =~ s/\xac/\n\t/g; -- 2.31.1