Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1727749rwd; Fri, 9 Jun 2023 00:58:45 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ74RoV19swGQkXnl60KoAc6HLvj+8ehVT68f0wWntrdbujEjHh9KYpRR+RUN2EmR+MFFuaP X-Received: by 2002:a05:6358:e816:b0:129:cce6:c52c with SMTP id gi22-20020a056358e81600b00129cce6c52cmr674668rwb.12.1686297525410; Fri, 09 Jun 2023 00:58:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686297525; cv=none; d=google.com; s=arc-20160816; b=Vi2FvsAR8SCpCna4XitBWLsczXem6Id0KFEbiSkFc28Nuh98gNf3ZkwJleQQXUraP7 km2jqY/cJyuzUmodf2tAA5jPfAr3puecNm9hu548TD6l7/Z01ANRdFImGFdsfrp64bY2 2w122Gnb78T1qAinBCc4guw0u4sdIDx5vI2h07ikxOYKJ6Puoj28UvrVUfNh0JfB96BU Wxk5B/EkuPSKP0O/LOnG/I52vS/MmUFB2LfPkP1bdJhvRxcfDYjLhwor2mfdlzs6Msyj F1OAANY3Auogxv7ljhwoGMyomVz0xTUNx0lXswePJpL/i+k9IGwinvrgsWqwaEhWoGhV BiXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=MSXRmBdF1kkwvwVrlXr/CrK5/h7D+Oeb67qWTqXPAZk=; b=CgPFO+35ShLtR5izlAFHvjnRnpTaraSBKJVY1AQzz864xSjQKjt0JOLQFx0MaeouxH 25W/ntL81Qlbq4e6nERxaYrwWFL9cR8JJO57oT0G5cXDDzD6Aid+jp28czU+QjZ7AI2h MSatM+roEsuXYfjJUWzUWCq1/7I+WQPBH62pS9j3+bQTiVaf3OK4EOOhgA/rafbjj2bs 13NiP3SyisP5jrJefpC2cw6o6rDO5KaSdeCYxLG42wEz3ZKVH/03iQKlMhM5B1Thb9ye g7gKByG06yii+0IxfPoZlPRj/5YAXONUnxL28eDftKoASvzbcwRVcfD7U/oWsqJxL78n TUcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=clEeeacP; dkim=neutral (no key) header.i=@linutronix.de header.b=lh2HfPxY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r16-20020a638f50000000b0053481d76f48si2270181pgn.288.2023.06.09.00.58.32; Fri, 09 Jun 2023 00:58:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=clEeeacP; dkim=neutral (no key) header.i=@linutronix.de header.b=lh2HfPxY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239413AbjFIHtk (ORCPT + 99 others); Fri, 9 Jun 2023 03:49:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54860 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239137AbjFIHru (ORCPT ); Fri, 9 Jun 2023 03:47:50 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1314830D2; Fri, 9 Jun 2023 00:47:44 -0700 (PDT) Date: Fri, 09 Jun 2023 07:47:43 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1686296863; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MSXRmBdF1kkwvwVrlXr/CrK5/h7D+Oeb67qWTqXPAZk=; b=clEeeacPta/cCyqCtbfys08yGM2/5XYvhyWI4gjXv2XxBCzkrDhBEs2b4QU6tgkj1CJYke HGfgp0Pv7KB+XT0Kq8rWM7QhN42vVUEPlHd9XPH8DIkGlOAJlfAoov4WVKLTvOhQEwnB9x ULw9EeWncYyhbqTrIJe/64299V+zFCj4J/Qv2tpa3k93ABZx4ylj+1nwHJmWxKrULMbyzT 5vUoSEcsiwUnPPceLCa7kWyCl79bGU8SF5tnj3ZKx0JGzm4HSyM+CWf3hGegW3h/kZTInO RswuM4TAB9XupXkconQewP+XakjEfT95PsFpxIrPQFODRvhxwX/+T5KHllQS5g== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1686296863; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MSXRmBdF1kkwvwVrlXr/CrK5/h7D+Oeb67qWTqXPAZk=; b=lh2HfPxY9hGah1Y2G2g6oOsaKIA47z3lU3KQfiyf3dmy8eXKKJzaySXrQb91TwQys5fsWf 8Bnv/jF02UVZx3CQ== From: "tip-bot2 for Lu Hongfei" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: objtool/core] tools: Remove unnecessary variables Cc: Lu Hongfei , Josh Poimboeuf , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20230530075649.21661-1-luhongfei@vivo.com> References: <20230530075649.21661-1-luhongfei@vivo.com> MIME-Version: 1.0 Message-ID: <168629686313.404.5459876924248310571.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the objtool/core branch of tip: Commit-ID: d49d1666aab51ad3caf79f414aff6b641837a6ea Gitweb: https://git.kernel.org/tip/d49d1666aab51ad3caf79f414aff6b641837a6ea Author: Lu Hongfei AuthorDate: Tue, 30 May 2023 15:56:49 +08:00 Committer: Josh Poimboeuf CommitterDate: Wed, 07 Jun 2023 09:27:11 -07:00 tools: Remove unnecessary variables There are several places where warnings variables are not needed, remove them and directly return 0. Signed-off-by: Lu Hongfei Link: https://lore.kernel.org/r/20230530075649.21661-1-luhongfei@vivo.com Signed-off-by: Josh Poimboeuf --- tools/objtool/check.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tools/objtool/check.c b/tools/objtool/check.c index a13c257..4b869de 100644 --- a/tools/objtool/check.c +++ b/tools/objtool/check.c @@ -3799,7 +3799,7 @@ static int validate_unwind_hints(struct objtool_file *file, struct section *sec) static int validate_unret(struct objtool_file *file, struct instruction *insn) { struct instruction *next, *dest; - int ret, warnings = 0; + int ret; for (;;) { next = next_insn_to_validate(file, insn); @@ -3897,7 +3897,7 @@ static int validate_unret(struct objtool_file *file, struct instruction *insn) insn = next; } - return warnings; + return 0; } /* @@ -4132,7 +4132,6 @@ static int add_prefix_symbols(struct objtool_file *file) { struct section *sec; struct symbol *func; - int warnings = 0; for_each_sec(file, sec) { if (!(sec->sh.sh_flags & SHF_EXECINSTR)) @@ -4146,7 +4145,7 @@ static int add_prefix_symbols(struct objtool_file *file) } } - return warnings; + return 0; } static int validate_symbol(struct objtool_file *file, struct section *sec,