[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20251117093137.572132-6-jolsa@kernel.org>
Date: Mon, 17 Nov 2025 10:31:37 +0100
From: Jiri Olsa <jolsa@...nel.org>
To: Thomas Gleixner <tglx@...utronix.de>,
Peter Zijlstra <peterz@...radead.org>
Cc: linux-kernel@...r.kernel.org,
x86@...nel.org,
Ingo Molnar <mingo@...nel.org>,
Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>
Subject: [PATCH 5/5] x86/insn-eval: Remove regs arg from get_reg_offset_16
It's not used, get_reg_offset_16 returns only offset to struct
pt_regs, not the actual register values.
Signed-off-by: Jiri Olsa <jolsa@...nel.org>
---
arch/x86/lib/insn-eval.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/arch/x86/lib/insn-eval.c b/arch/x86/lib/insn-eval.c
index 56563a5c4b42..4d8878092330 100644
--- a/arch/x86/lib/insn-eval.c
+++ b/arch/x86/lib/insn-eval.c
@@ -532,7 +532,6 @@ static int get_reg_offset(struct insn *insn, enum reg_type type)
/**
* get_reg_offset_16() - Obtain offset of register indicated by instruction
* @insn: Instruction containing ModRM byte
- * @regs: Register values as seen when entering kernel mode
* @offs1: Offset of the first operand register
* @offs2: Offset of the second operand register, if applicable
*
@@ -546,8 +545,7 @@ static int get_reg_offset(struct insn *insn, enum reg_type type)
*
* 0 on success, -EINVAL on error.
*/
-static int get_reg_offset_16(struct insn *insn, struct pt_regs *regs,
- int *offs1, int *offs2)
+static int get_reg_offset_16(struct insn *insn, int *offs1, int *offs2)
{
/*
* 16-bit addressing can use one or two registers. Specifics of
@@ -1100,7 +1098,7 @@ static int get_eff_addr_modrm_16(struct insn *insn, struct pt_regs *regs,
if (X86_MODRM_MOD(insn->modrm.value) > 2)
return -EINVAL;
- ret = get_reg_offset_16(insn, regs, &addr_offset1, &addr_offset2);
+ ret = get_reg_offset_16(insn, &addr_offset1, &addr_offset2);
if (ret < 0)
return -EINVAL;
--
2.51.1
Powered by blists - more mailing lists