public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: Julian Stecklina <julian.stecklina@cyberus-technology.de>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
	kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] KVM: x86: rename push to emulate_push for consistency
Date: Wed, 4 Oct 2023 08:13:12 -0700	[thread overview]
Message-ID: <ZR2BCHmqofCcAuBM@google.com> (raw)
In-Reply-To: <20231004133827.107-2-julian.stecklina@cyberus-technology.de>

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@cyberus-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().

  reply	other threads:[~2023-10-04 15:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-04 13:38 [PATCH 1/2] KVM: x86: Fix partially uninitialized integer in emulate_pop Julian Stecklina
2023-10-04 13:38 ` [PATCH 2/2] KVM: x86: rename push to emulate_push for consistency Julian Stecklina
2023-10-04 15:13   ` Sean Christopherson [this message]
2023-10-04 15:07 ` [PATCH 1/2] KVM: x86: Fix partially uninitialized integer in emulate_pop Sean Christopherson
2023-10-05 13:48   ` Julian Stecklina
2023-10-06  0:56     ` Sean Christopherson
2023-10-06  9:04       ` Julian Stecklina
2023-10-09  9:20 ` [PATCH v2 " Julian Stecklina
2023-10-09  9:20   ` [PATCH v2 2/2] KVM: x86: rename push to emulate_push for consistency Julian Stecklina
2024-02-09  0:22   ` [PATCH v2 1/2] KVM: x86: Fix partially uninitialized integer in emulate_pop Sean Christopherson

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=ZR2BCHmqofCcAuBM@google.com \
    --to=seanjc@google.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=julian.stecklina@cyberus-technology.de \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=tglx@linutronix.de \
    --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