lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 20 Sep 2022 16:14:15 +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 2/3] tools: objtool: fix unused-parameter warning in check.c

Remove unused parameters of internal functions.

There is no logic changes.

Signed-off-by: Zeng Heng <zengheng4@...wei.com>
---
 tools/objtool/check.c | 24 +++++++++++-------------
 1 file changed, 11 insertions(+), 13 deletions(-)

diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index 7f2a867f8f85..cee5436b3bf9 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -268,8 +268,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);
@@ -2446,7 +2445,7 @@ static bool is_fentry_call(struct instruction *insn)
 	return false;
 }
 
-static bool has_modified_stack_frame(struct instruction *insn, struct insn_state *state)
+static bool has_modified_stack_frame(struct insn_state *state)
 {
 	struct cfi_state *cfi = &state->cfi;
 	int i;
@@ -2491,9 +2490,8 @@ static bool has_valid_stack_frame(struct insn_state *state)
 	return false;
 }
 
-static int update_cfi_state_regs(struct instruction *insn,
-				  struct cfi_state *cfi,
-				  struct stack_op *op)
+static int update_cfi_state_regs(struct cfi_state *cfi,
+				 struct stack_op *op)
 {
 	struct cfi_reg *cfa = &cfi->cfa;
 
@@ -2602,7 +2600,7 @@ static int update_cfi_state(struct instruction *insn,
 
 	if (cfi->type == UNWIND_HINT_TYPE_REGS ||
 	    cfi->type == UNWIND_HINT_TYPE_REGS_PARTIAL)
-		return update_cfi_state_regs(insn, cfi, op);
+		return update_cfi_state_regs(cfi, op);
 
 	switch (op->dest.type) {
 
@@ -3015,7 +3013,7 @@ static int update_cfi_state(struct instruction *insn,
  * and replacement) into a single shared CFI array which can be used to detect
  * conflicts and nicely feed a linear array of ORC entries to the unwinder.
  */
-static int propagate_alt_cfi(struct objtool_file *file, struct instruction *insn)
+static int propagate_alt_cfi(struct instruction *insn)
 {
 	struct cfi_state **alt_cfi;
 	int group_off;
@@ -3249,7 +3247,7 @@ static int validate_sibling_call(struct objtool_file *file,
 				 struct instruction *insn,
 				 struct insn_state *state)
 {
-	if (has_modified_stack_frame(insn, state)) {
+	if (has_modified_stack_frame(state)) {
 		WARN_FUNC("sibling call from callable instruction with modified stack frame",
 				insn->sec, insn->offset);
 		return 1;
@@ -3284,7 +3282,7 @@ static int validate_return(struct symbol *func, struct instruction *insn, struct
 		return 1;
 	}
 
-	if (func && has_modified_stack_frame(insn, state)) {
+	if (func && has_modified_stack_frame(state)) {
 		WARN_FUNC("return with modified stack frame",
 			  insn->sec, insn->offset);
 		return 1;
@@ -3405,7 +3403,7 @@ static int validate_branch(struct objtool_file *file, struct symbol *func,
 
 		insn->visited |= visited;
 
-		if (propagate_alt_cfi(file, insn))
+		if (propagate_alt_cfi(insn))
 			return 1;
 
 		if (!insn->ignore_alts && !list_empty(&insn->alts)) {
@@ -3567,7 +3565,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) {
 		insn = find_insn(file, sec, 0);
@@ -3930,7 +3928,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.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ