[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZR2BCHmqofCcAuBM@google.com>
Date: Wed, 4 Oct 2023 08:13:12 -0700
From: Sean Christopherson <seanjc@...gle.com>
To: Julian Stecklina <julian.stecklina@...erus-technology.de>
Cc: Paolo Bonzini <pbonzini@...hat.com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org,
"H. Peter Anvin" <hpa@...or.com>, kvm@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] KVM: x86: rename push to emulate_push for consistency
On Wed, Oct 04, 2023, Julian Stecklina wrote:
> push and emulate_pop are counterparts. Rename push to emulate_push and
> harmonize its function signature with emulate_pop. This should remove
> a bit of cognitive load when reading this code.
>
> Signed-off-by: Julian Stecklina <julian.stecklina@...erus-technology.de>
> ---
> arch/x86/kvm/emulate.c | 11 ++++++-----
> 1 file changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
> index fc4a365a309f..33f3327ddfa7 100644
> --- a/arch/x86/kvm/emulate.c
> +++ b/arch/x86/kvm/emulate.c
> @@ -1819,22 +1819,23 @@ static int writeback(struct x86_emulate_ctxt *ctxt, struct operand *op)
> return X86EMUL_CONTINUE;
> }
>
> -static int push(struct x86_emulate_ctxt *ctxt, void *data, int bytes)
> +static int emulate_push(struct x86_emulate_ctxt *ctxt, const unsigned long *data,
> + u8 op_bytes)
I like the rename and making @data const, but please leave @bytes as an int.
Regarding @bytes versus @len, my vote is to do s/len/bytes for emulate_pop() and
emulate_popf().
Powered by blists - more mailing lists