Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp696747pxb; Thu, 23 Sep 2021 08:49:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx/CgntKE+JgROcI9JjRRsl8tm127vNyUIw8RMub+GrsjNBBocUAZapTDqNol8qHOs1YPiL X-Received: by 2002:a50:e009:: with SMTP id e9mr6181362edl.254.1632412195040; Thu, 23 Sep 2021 08:49:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632412195; cv=none; d=google.com; s=arc-20160816; b=gR/tyJJPy386dnS/YeNDb1CKSInrz7ejyBV6gZRBb33DIa8oBBMrbySD+buboEZ8ec c3NPH7k5SginyFaDmngcW3AkR81rsOFBM9FqecSv7KHS9d9B8wZM2vpCgt3oa1xVy1lV ip3zJ8gOTs8boDZcMrasQlZCDPAOgkPx2OtQ9OQwb8aLPIpnLmEnBvpfdtG6H09RHr92 bMcE8iBUghyFKEq+OCwh0eI+rwuYh6c3M7sUu+MOLpUuvktQtNKNYVDbv/hFx2DkrGrI IQNH+clhlM+FcOeIATMbA4/4WgAi9g5dxheqDnglcgU5u4EfBfhsiTtvu9fEeqoCu5Yx gUmg== 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=qdwwCWVXul4RZl/6vgjJMpI2WaK634lfmm/nAysEJKtEeZ2hekAXjikrvgYqp2klh0 kp4ILXPAvM81EoNBOASKzIupaNlclVCJEUCdXN71G4CObY2f6CzIIPExb4Cr62x0Y9ix VDz5K7bGTgSBoAMHc33I9edsnT3ctjculXs/f0/EN8rgYV6YjwFRRIH2h/K9xAHJ5g9C ay4vw6jr52mtV3pliwvOGwqztYVm/k0WAmLmjeDZ+/yFzhCsIvZKnp5EGH9PMI3dRPJz mtv/56Qx8jsNjZrxOhHIzbo8+QloKI0iy4sUpHlvmRWaVymp/31qIxuJTSFuyyfN4jIv xFfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=iM32OscL; 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 h24si8008379ejt.376.2021.09.23.08.49.29; Thu, 23 Sep 2021 08:49:55 -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=iM32OscL; 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 S242113AbhIWPsh (ORCPT + 99 others); Thu, 23 Sep 2021 11:48:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:38526 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242096AbhIWPnQ (ORCPT ); Thu, 23 Sep 2021 11:43:16 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 85918611B0; Thu, 23 Sep 2021 15:41:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1632411693; bh=Iw2fDEKzMDejp/o4wtP5bv8wvrqWKI39WK/zq08eWqI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iM32OscLv+jTz+UgdY5MhKcr2CE2aN1dorUJAeeUuMjKgK7ek2DaKAyAPdN1sKSY5 2vqpN2B547PfD3lRkYt105YJaNzlOodv9OzSuY4z7mNP5yTxiXsquwZ7Vm6eZmreWG zyERNa9E+Z4jT539RFr8QeA9M/g4DNart9K2Mu4wWrfMuedY1hu5906kQ42eA5TnTy tmwtg/8M+OcK13odO+zvsWnouab2aEw/lzT6/Bjqk9uFq+W0KtUVUIo/yju8lWHmsg lHJYFWOFOzcRJkH/XRHaAN86obQ/JMkBPqMEDsh67A2mb+iyhvewNedg8WzqSQ3UJL RBCSpY3f4WZ/w== Received: by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1mTQqp-000p6S-Rj; Thu, 23 Sep 2021 17:41:31 +0200 From: Mauro Carvalho Chehab To: #@kernel.org, YUyICHTRdfL8Ul7X@kroah.com, Linux Doc Mailing List , Greg Kroah-Hartman Cc: Mauro Carvalho Chehab , "Jonathan Corbet" , linux-kernel@vger.kernel.org Subject: [PATCH 6/8] scripts: get_abi.pl: stop check loop earlier when regex is found Date: Thu, 23 Sep 2021 17:41:17 +0200 Message-Id: <2ba722d2cdbe7c7d0f1d1b58d350052576d1d703.1632411447.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