Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp578946pxb; Thu, 23 Sep 2021 06:34:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz3CWd+WfDR8Iykw3TvPATCFObUEJ9333DXEDIoeAoMZtvsBPcxZq5FjiJ95ova5ox/293a X-Received: by 2002:a17:906:29d0:: with SMTP id y16mr5191089eje.477.1632404085205; Thu, 23 Sep 2021 06:34:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632404085; cv=none; d=google.com; s=arc-20160816; b=vjnYG7kr4XRc0C3QfAAXAuyDvWKTABe7ym0H0EGIGPpyxatqOs/ufx4fP249gLkAz3 dKUGWP2NNmABn5U8F2W3CIYckw8K2uEdfEPAiCVWA0mCYDdTCqlLmQ08vn9DZ564QZ2F VGIX0xl8ENJy2QGgCpyXZlZQDOJ9ImhWoSOEtuNeoZ++jsL3+Mdqq7YUowl8KM3Y+gsf lgYHMzxxXr8tGTLhh7Qz7rlYdF3XBnw0hqHvjcAbGdlqzKz2R3nD0GFaPTVHIfp7paVf y0JLZv0WKDy+0d3KcnLx2do4/7IDjImlIrxr/MILcpP7a60RaXbPsgyx1k9UMWRzuMPJ +rEw== 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=3rYUpklJi6qruMkSOsiX7sGNHU6hqu46+Wht4+bVniU=; b=AazrBLkHs2auoKXp2og0EYaG6MPWkRjLnuTcRZWyGyPBteCvhIgOcK50TmqQc/hWnU lIryXZpod11Qsr8NGa9tCHb3rOCzmlA5qzIfXwSX18gtJF4vy4F099H3zpilZpNt9/H1 IMRltU3CEGVjHleW8Rg4RB5oECnxl1D6FZ+omfzdoxiiWVg/wt/cI73Yzomp4DFim/W/ cDiBftv73Lw0U0JW383vYTtrpdZDwA9TNgy/QSCVjUfnzLYFjsrazGWoo4UundK1IV5E I/sUEkdPrALev7HuheturcfZQHoooxCgJTPCpkkceZwf6MjRamTvSyH74+mGD4n2ep1Y I79Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RFzexhLk; 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 v17si5418065eds.80.2021.09.23.06.34.19; Thu, 23 Sep 2021 06:34:45 -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=RFzexhLk; 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 S241482AbhIWNc0 (ORCPT + 99 others); Thu, 23 Sep 2021 09:32:26 -0400 Received: from mail.kernel.org ([198.145.29.99]:44106 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241241AbhIWNbq (ORCPT ); Thu, 23 Sep 2021 09:31:46 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C65696127A; 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=Iw2fDEKzMDejp/o4wtP5bv8wvrqWKI39WK/zq08eWqI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RFzexhLkHpDu74xDsNDoXkaj31xWvjihNAkUu1gw2Uw7hKzb5V2HOyVtBxHRpzvVd Vh3Nm/TZ2ljRDya45Hb4D6/fqED/GcRGWBM+pW4vuMmi5fjtDjhE7QnP9qiuLSO+T2 aUc3UeR38oxhXi34754LWXB+Ry6pGczhKdy5OGBPKArGettUghcIhAtVYkSamVfMgs tHguDb1MrHXXtYwDfBrKFHPFnbhbugCLOSKe9NZVZ7n2BRFesJdMgC4vkvx63lXyZ3 D3aBxl2gY6ncYFrbCGj4MkELWlkOof5Ih7+GlLNKalvnZSNAxGjMre22bIPvZsYXcp /0+wyVZzLGLeQ== Received: by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1mTOnl-000neU-2Y; 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 11/13] scripts: get_abi.pl: stop check loop earlier when regex is found Date: Thu, 23 Sep 2021 15:30:09 +0200 Message-Id: <333efdaa5ccfce1a0d540c266897947d7853b94f.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 Right now, there are two loops used to seek for a regex. Make sure that both will be skip when a match is found. While here, drop the unused $defined variable. Signed-off-by: Mauro Carvalho Chehab --- scripts/get_abi.pl | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/scripts/get_abi.pl b/scripts/get_abi.pl index 42eb16eb78e9..d45e5ba56f9c 100755 --- a/scripts/get_abi.pl +++ b/scripts/get_abi.pl @@ -685,7 +685,6 @@ sub check_undefined_symbols { my @names = @{$$file_ref{"__name"}}; my $file = $names[0]; - my $defined = 0; my $exact = 0; my $found_string; @@ -711,13 +710,11 @@ sub check_undefined_symbols { last; } } + last if ($exact); } - - $defined++; - next if ($exact); - if ($hint && $defined && (!$search_string || $found_string)) { + if ($hint && (!$search_string || $found_string)) { $what =~ s/\xac/\n\t/g; if ($leave ne "others") { print " more likely regexes:\n\t$what\n"; -- 2.31.1