[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240327040047.478695-1-alexs@kernel.org>
Date: Wed, 27 Mar 2024 12:00:46 +0800
From: alexs@...nel.org
To: Josh Poimboeuf <jpoimboe@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
linux-kernel@...r.kernel.org (open list)
Cc: linux-kernel@...r.kernel.org,
"Alex Shi (tencent)" <alexs@...nel.org>
Subject: [PATCH v2 1/2] objtool: remove unused file argument for init_insn_state
From: "Alex Shi (tencent)" <alexs@...nel.org>
Remove unused file parameter from init_insn_state(). to save a bit code
text.
Signed-off-by: Alex Shi <alexs@...nel.org>
To: linux-kernel@...r.kernel.org
To: Peter Zijlstra <peterz@...radead.org>
To: Josh Poimboeuf <jpoimboe@...nel.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 548ec3cd7c00..88ac3e2be2bd 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -274,8 +274,7 @@ static void init_cfi_state(struct cfi_state *cfi)
cfi->drap_offset = -1;
}
-static void init_insn_state(struct objtool_file *file, struct insn_state *state,
- struct section *sec)
+static void init_insn_state(struct insn_state *state, struct section *sec)
{
memset(state, 0, sizeof(*state));
init_cfi_state(&state->cfi);
@@ -3814,7 +3813,7 @@ static int validate_unwind_hints(struct objtool_file *file, struct section *sec)
if (!file->hints)
return 0;
- init_insn_state(file, &state, sec);
+ init_insn_state(&state, sec);
if (sec) {
sec_for_each_insn(file, sec, insn)
@@ -4221,7 +4220,7 @@ static int validate_section(struct objtool_file *file, struct section *sec)
if (func->type != STT_FUNC)
continue;
- init_insn_state(file, &state, sec);
+ init_insn_state(&state, sec);
set_func_state(&state.cfi);
warnings += validate_symbol(file, sec, func, &state);
--
2.43.0
Powered by blists - more mailing lists