diff mbox series

[11/19] KVM: x86/svm: Remove unused "vector" of sev_vcpu_deliver_sipi_vector()

Message ID 20220125095909.38122-12-cloudliang@tencent.com (mailing list archive)
State New, archived
Headers show
Series KVM: x86: Bulk removal of unused function parameters | expand

Commit Message

Jinrong Liang Jan. 25, 2022, 9:59 a.m. UTC
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(-)

Comments

Paolo Bonzini Jan. 25, 2022, 4:16 p.m. UTC | #1
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
diff mbox series

Patch

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);