[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20220920081416.3570803-4-zengheng4@huawei.com>
Date: Tue, 20 Sep 2022 16:14:16 +0800
From: Zeng Heng <zengheng4@...wei.com>
To: <jpoimboe@...nel.org>, <peterz@...radead.org>, <mbenes@...e.cz>
CC: <linux-kernel@...r.kernel.org>, <zengheng4@...wei.com>,
<liwei391@...wei.com>
Subject: [PATCH -next 3/3] tools: objtool: fix unused-parameter warning in special.c
Remove unused parameters of function
'arch_support_alt_relocation'.
There is no logic changes.
Signed-off-by: Zeng Heng <zengheng4@...wei.com>
---
tools/objtool/arch/x86/special.c | 3 +--
tools/objtool/check.c | 2 +-
tools/objtool/include/objtool/special.h | 3 +--
3 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/tools/objtool/arch/x86/special.c b/tools/objtool/arch/x86/special.c
index 7c97b7391279..2524156f0f23 100644
--- a/tools/objtool/arch/x86/special.c
+++ b/tools/objtool/arch/x86/special.c
@@ -39,8 +39,7 @@ void arch_handle_alternative(unsigned short feature, struct special_alt *alt)
}
bool arch_support_alt_relocation(struct special_alt *special_alt,
- struct instruction *insn,
- struct reloc *reloc)
+ struct instruction *insn)
{
/*
* The x86 alternatives code adjusts the offsets only when it
diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index cee5436b3bf9..1f755700c036 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -1645,7 +1645,7 @@ static int handle_group_alt(struct objtool_file *file,
*/
alt_reloc = insn_reloc(file, insn);
if (alt_reloc &&
- !arch_support_alt_relocation(special_alt, insn, alt_reloc)) {
+ !arch_support_alt_relocation(special_alt, insn)) {
WARN_FUNC("unsupported relocation in alternatives section",
insn->sec, insn->offset);
diff --git a/tools/objtool/include/objtool/special.h b/tools/objtool/include/objtool/special.h
index dc4721e19002..fc184be6cd9f 100644
--- a/tools/objtool/include/objtool/special.h
+++ b/tools/objtool/include/objtool/special.h
@@ -35,8 +35,7 @@ int special_get_alts(struct elf *elf, struct list_head *alts);
void arch_handle_alternative(unsigned short feature, struct special_alt *alt);
bool arch_support_alt_relocation(struct special_alt *special_alt,
- struct instruction *insn,
- struct reloc *reloc);
+ struct instruction *insn);
struct reloc *arch_find_switch_table(struct objtool_file *file,
struct instruction *insn);
#endif /* _SPECIAL_H */
--
2.25.1
Powered by blists - more mailing lists