From: Nikolay Borisov <nik.borisov@suse.com>
To: bp@alien8.de
Cc: linux-kernel@vger.kernel.org, x86@kernel.org,
Nikolay Borisov <nik.borisov@suse.com>
Subject: [PATCH 2/2] x86/insn: Directly assign x86_64 state in init_ins
Date: Thu, 22 Feb 2024 13:16:36 +0200 [thread overview]
Message-ID: <20240222111636.2214523-3-nik.borisov@suse.com> (raw)
In-Reply-To: <20240222111636.2214523-1-nik.borisov@suse.com>
No point in checking again as this was already done by the caller.
Signed-off-by: Nikolay Borisov <nik.borisov@suse.com>
---
arch/x86/lib/insn.c | 2 +-
tools/arch/x86/lib/insn.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/lib/insn.c b/arch/x86/lib/insn.c
index 3946bdc75087..1bb155a0955b 100644
--- a/arch/x86/lib/insn.c
+++ b/arch/x86/lib/insn.c
@@ -71,7 +71,7 @@ void insn_init(struct insn *insn, const void *kaddr, int buf_len, int x86_64)
insn->kaddr = kaddr;
insn->end_kaddr = kaddr + buf_len;
insn->next_byte = kaddr;
- insn->x86_64 = x86_64 ? 1 : 0;
+ insn->x86_64 = x86_64;
insn->opnd_bytes = 4;
if (x86_64)
insn->addr_bytes = 8;
diff --git a/tools/arch/x86/lib/insn.c b/tools/arch/x86/lib/insn.c
index 5d81924478d9..ada4b4a79dd4 100644
--- a/tools/arch/x86/lib/insn.c
+++ b/tools/arch/x86/lib/insn.c
@@ -71,7 +71,7 @@ void insn_init(struct insn *insn, const void *kaddr, int buf_len, int x86_64)
insn->kaddr = kaddr;
insn->end_kaddr = kaddr + buf_len;
insn->next_byte = kaddr;
- insn->x86_64 = x86_64 ? 1 : 0;
+ insn->x86_64 = x86_64;
insn->opnd_bytes = 4;
if (x86_64)
insn->addr_bytes = 8;
--
2.34.1
next prev parent reply other threads:[~2024-02-22 11:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-22 11:16 [PATCH 0/2] Cleanup x86 instruction decoder Nikolay Borisov
2024-02-22 11:16 ` [PATCH 1/2] x86/insn: Remove superfluous checks from instruction decoding routines Nikolay Borisov
2024-02-22 11:31 ` [tip: x86/asm] " tip-bot2 for Nikolay Borisov
2024-02-22 11:16 ` Nikolay Borisov [this message]
2024-02-22 11:31 ` [tip: x86/asm] x86/insn: Directly assign x86_64 state in insn_init() tip-bot2 for Nikolay Borisov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240222111636.2214523-3-nik.borisov@suse.com \
--to=nik.borisov@suse.com \
--cc=bp@alien8.de \
--cc=linux-kernel@vger.kernel.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®