From: Paolo Bonzini <pbonzini@redhat.com>
To: Jinrong Liang <ljr.kernel@gmail.com>
Cc: Xianting Tian <xianting.tian@linux.alibaba.com>,
Jim Mattson <jmattson@google.com>,
Sean Christopherson <seanjc@google.com>,
Vitaly Kuznetsov <vkuznets@redhat.com>,
Wanpeng Li <wanpengli@tencent.com>,
Joerg Roedel <joro@8bytes.org>,
kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 11/19] KVM: x86/svm: Remove unused "vector" of sev_vcpu_deliver_sipi_vector()
Date: Tue, 25 Jan 2022 17:16:44 +0100 [thread overview]
Message-ID: <c8206916-a510-cc4d-3b41-1f1a7d650c84@redhat.com> (raw)
In-Reply-To: <20220125095909.38122-12-cloudliang@tencent.com>
On 1/25/22 10:59, Jinrong Liang wrote:
> From: Jinrong Liang <cloudliang@tencent.com>
>
> The "struct kvm_vcpu *vcpu" parameter of sev_vcpu_deliver_sipi_vector()
> is not used, so remove it. No functional change intended.
>
> Signed-off-by: Jinrong Liang <cloudliang@tencent.com>
> ---
> arch/x86/kvm/svm/sev.c | 2 +-
> arch/x86/kvm/svm/svm.c | 2 +-
> arch/x86/kvm/svm/svm.h | 2 +-
> 3 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/arch/x86/kvm/svm/sev.c b/arch/x86/kvm/svm/sev.c
> index 0727ac7221d7..2fd1e91054b3 100644
> --- a/arch/x86/kvm/svm/sev.c
> +++ b/arch/x86/kvm/svm/sev.c
> @@ -2925,7 +2925,7 @@ void sev_es_prepare_guest_switch(unsigned int cpu)
> hostsa->xss = host_xss;
> }
>
> -void sev_vcpu_deliver_sipi_vector(struct kvm_vcpu *vcpu, u8 vector)
> +void sev_vcpu_deliver_sipi_vector(struct kvm_vcpu *vcpu)
> {
> struct vcpu_svm *svm = to_svm(vcpu);
>
> diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c
> index 3e75ae834412..aead235a90ee 100644
> --- a/arch/x86/kvm/svm/svm.c
> +++ b/arch/x86/kvm/svm/svm.c
> @@ -4348,7 +4348,7 @@ static void svm_vcpu_deliver_sipi_vector(struct kvm_vcpu *vcpu, u8 vector)
> if (!sev_es_guest(vcpu->kvm))
> return kvm_vcpu_deliver_sipi_vector(vcpu, vector);
>
> - sev_vcpu_deliver_sipi_vector(vcpu, vector);
> + sev_vcpu_deliver_sipi_vector(vcpu);
> }
>
> static void svm_vm_destroy(struct kvm *kvm)
> diff --git a/arch/x86/kvm/svm/svm.h b/arch/x86/kvm/svm/svm.h
> index 0a749bbda738..61c96f4a7006 100644
> --- a/arch/x86/kvm/svm/svm.h
> +++ b/arch/x86/kvm/svm/svm.h
> @@ -621,7 +621,7 @@ int sev_handle_vmgexit(struct kvm_vcpu *vcpu);
> int sev_es_string_io(struct vcpu_svm *svm, int size, unsigned int port, int in);
> void sev_es_init_vmcb(struct vcpu_svm *svm);
> void sev_es_vcpu_reset(struct vcpu_svm *svm);
> -void sev_vcpu_deliver_sipi_vector(struct kvm_vcpu *vcpu, u8 vector);
> +void sev_vcpu_deliver_sipi_vector(struct kvm_vcpu *vcpu);
> void sev_es_prepare_guest_switch(unsigned int cpu);
> void sev_es_unmap_ghcb(struct vcpu_svm *svm);
>
For this one and patch 10, even if the argument is not used, the code
seems more natural if it is there. It is more of an implementation
detail that it is not used.
Paolo
next prev parent reply other threads:[~2022-01-25 16:21 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-25 9:58 [PATCH 00/19] KVM: x86: Bulk removal of unused function parameters Jinrong Liang
2022-01-25 9:58 ` [PATCH 01/19] KVM: x86/mmu: Remove unused "kvm" of kvm_mmu_unlink_parents() Jinrong Liang
2022-01-25 9:58 ` [PATCH 02/19] KVM: x86/mmu: Remove unused "kvm" of __rmap_write_protect() Jinrong Liang
2022-01-25 9:58 ` [PATCH 03/19] KVM: x86/mmu: Remove unused "vcpu" of reset_{tdp,ept}_shadow_zero_bits_mask() Jinrong Liang
2022-01-25 9:58 ` [PATCH 04/19] KVM: x86/tdp_mmu: Remove unused "kvm" of kvm_tdp_mmu_get_root() Jinrong Liang
2022-01-25 9:58 ` [PATCH 05/19] KVM: x86/mmu_audit: Remove unused "level" of audit_spte_after_sync() Jinrong Liang
2022-01-25 9:58 ` [PATCH 06/19] KVM: x86/svm: Remove unused "vcpu" of svm_check_exit_valid() Jinrong Liang
2022-01-25 9:58 ` [PATCH 07/19] KVM: x86/svm: Remove unused "vcpu" of nested_svm_check_tlb_ctl() Jinrong Liang
2022-01-25 16:02 ` Paolo Bonzini
2022-01-25 9:58 ` [PATCH 08/19] KVM: x86: Remove unused "vcpu" of kvm_after_interrupt() Jinrong Liang
2022-01-25 9:58 ` [PATCH 09/19] KVM: x86/svm: Remove unused "svm" of sev_es_prepare_guest_switch() Jinrong Liang
2022-01-25 16:29 ` Paolo Bonzini
2022-01-25 9:59 ` [PATCH 10/19] KVM: x86/sev: Remove unused "kvm" of sev_unbind_asid() Jinrong Liang
2022-01-25 9:59 ` [PATCH 11/19] KVM: x86/svm: Remove unused "vector" of sev_vcpu_deliver_sipi_vector() Jinrong Liang
2022-01-25 16:16 ` Paolo Bonzini [this message]
2022-01-25 9:59 ` [PATCH 12/19] KVM: x86/i8259: Remove unused "addr" of elcr_ioport_{read,write}() Jinrong Liang
2022-01-25 9:59 ` [PATCH 13/19] KVM: x86/ioapic: Remove unused "addr" and "length" of ioapic_read_indirect() Jinrong Liang
2022-01-25 9:59 ` [PATCH 14/19] KVM: x86/emulate: Remove unused "ctxt" of setup_syscalls_segments() Jinrong Liang
2022-01-25 9:59 ` [PATCH 15/19] KVM: x86/emulate: Remove unused "ctxt" of task_switch_{16, 32}() Jinrong Liang
2022-01-25 16:29 ` Paolo Bonzini
2022-01-25 9:59 ` [PATCH 16/19] KVM: x86: Remove unused "vcpu" of kvm_arch_tsc_has_attr() Jinrong Liang
2022-01-25 16:31 ` Paolo Bonzini
2022-01-25 9:59 ` [PATCH 17/19] KVM: x86: Remove unused "vcpu" of kvm_scale_tsc() Jinrong Liang
2022-01-25 9:59 ` [PATCH 18/19] KVM: Remove unused "kvm" of kvm_make_vcpu_request() Jinrong Liang
2022-01-25 9:59 ` [PATCH 19/19] KVM: Remove unused "flags" of kvm_pv_kick_cpu_op() Jinrong Liang
2022-01-25 16:32 ` [PATCH 00/19] KVM: x86: Bulk removal of unused function parameters Paolo Bonzini
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=c8206916-a510-cc4d-3b41-1f1a7d650c84@redhat.com \
--to=pbonzini@redhat.com \
--cc=jmattson@google.com \
--cc=joro@8bytes.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ljr.kernel@gmail.com \
--cc=seanjc@google.com \
--cc=vkuznets@redhat.com \
--cc=wanpengli@tencent.com \
--cc=xianting.tian@linux.alibaba.com \
/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®