From: baomingtong001@208suo.com
To: jpoimboe@kernel.org, peterz@infradead.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] objtool: remove unneeded variable from add_prefix_symbols()
Date: Wed, 14 Jun 2023 14:36:09 +0800 [thread overview]
Message-ID: <92605b0b9589ffc556dfd0d279635dc9@208suo.com> (raw)
In-Reply-To: <20230614063248.27844-1-luojianhong@cdjrlc.com>
fix the following coccicheck warning:
tools/objtool/check.c:4135:5-13: Unneeded variable: "warnings". Return
"0".
Signed-off-by: Mingtong Bao <baomingtong001@208suo.com>
---
tools/objtool/check.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index a13c257f80dd..d12de0e2cf00 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -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,
parent reply other threads:[~2023-06-14 6:37 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20230614063248.27844-1-luojianhong@cdjrlc.com>]
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=92605b0b9589ffc556dfd0d279635dc9@208suo.com \
--to=baomingtong001@208suo.com \
--cc=jpoimboe@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.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®