From: "tip-bot2 for Lu Hongfei" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Lu Hongfei <luhongfei@vivo.com>,
Josh Poimboeuf <jpoimboe@kernel.org>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: objtool/core] tools: Remove unnecessary variables
Date: Fri, 09 Jun 2023 07:47:43 -0000 [thread overview]
Message-ID: <168629686313.404.5459876924248310571.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20230530075649.21661-1-luhongfei@vivo.com>
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 <luhongfei@vivo.com>
AuthorDate: Tue, 30 May 2023 15:56:49 +08:00
Committer: Josh Poimboeuf <jpoimboe@kernel.org>
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 <luhongfei@vivo.com>
Link: https://lore.kernel.org/r/20230530075649.21661-1-luhongfei@vivo.com
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
---
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,
prev parent reply other threads:[~2023-06-09 7:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-30 7:56 [PATCH] " Lu Hongfei
2023-05-30 23:10 ` Josh Poimboeuf
2023-06-09 7:47 ` tip-bot2 for Lu Hongfei [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=168629686313.404.5459876924248310571.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=jpoimboe@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=luhongfei@vivo.com \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®