Commit 07a5d4bc authored by Nikolay Borisov's avatar Nikolay Borisov Committed by Ingo Molnar

x86/insn: Directly assign x86_64 state in insn_init()

No point in checking again as this was already done by the caller.
Signed-off-by: default avatarNikolay Borisov <nik.borisov@suse.com>
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/20240222111636.2214523-3-nik.borisov@suse.com
parent 427e1646
...@@ -71,7 +71,7 @@ void insn_init(struct insn *insn, const void *kaddr, int buf_len, int x86_64) ...@@ -71,7 +71,7 @@ void insn_init(struct insn *insn, const void *kaddr, int buf_len, int x86_64)
insn->kaddr = kaddr; insn->kaddr = kaddr;
insn->end_kaddr = kaddr + buf_len; insn->end_kaddr = kaddr + buf_len;
insn->next_byte = kaddr; insn->next_byte = kaddr;
insn->x86_64 = x86_64 ? 1 : 0; insn->x86_64 = x86_64;
insn->opnd_bytes = 4; insn->opnd_bytes = 4;
if (x86_64) if (x86_64)
insn->addr_bytes = 8; insn->addr_bytes = 8;
......
...@@ -71,7 +71,7 @@ void insn_init(struct insn *insn, const void *kaddr, int buf_len, int x86_64) ...@@ -71,7 +71,7 @@ void insn_init(struct insn *insn, const void *kaddr, int buf_len, int x86_64)
insn->kaddr = kaddr; insn->kaddr = kaddr;
insn->end_kaddr = kaddr + buf_len; insn->end_kaddr = kaddr + buf_len;
insn->next_byte = kaddr; insn->next_byte = kaddr;
insn->x86_64 = x86_64 ? 1 : 0; insn->x86_64 = x86_64;
insn->opnd_bytes = 4; insn->opnd_bytes = 4;
if (x86_64) if (x86_64)
insn->addr_bytes = 8; insn->addr_bytes = 8;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment