diff mbox series

KVM: vmx: delete meaningless vmx_decache_cr0_guest_bits() declaration

Message ID 1580916833-28905-1-git-send-email-linmiaohe@huawei.com (mailing list archive)
State New, archived
Headers show
Series KVM: vmx: delete meaningless vmx_decache_cr0_guest_bits() declaration | expand

Commit Message

Miaohe Lin Feb. 5, 2020, 3:33 p.m. UTC
From: Miaohe Lin <linmiaohe@huawei.com>

The function vmx_decache_cr0_guest_bits() is only called below its
implementation. So this is meaningless and should be removed.

Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
---
 arch/x86/kvm/vmx/vmx.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Vitaly Kuznetsov Feb. 5, 2020, 4:56 p.m. UTC | #1
linmiaohe <linmiaohe@huawei.com> writes:

> From: Miaohe Lin <linmiaohe@huawei.com>
>
> The function vmx_decache_cr0_guest_bits() is only called below its
> implementation. So this is meaningless and should be removed.
>
> Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
> ---
>  arch/x86/kvm/vmx/vmx.c | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
> index 678edbd6e278..061fefc30ecc 100644
> --- a/arch/x86/kvm/vmx/vmx.c
> +++ b/arch/x86/kvm/vmx/vmx.c
> @@ -1428,8 +1428,6 @@ static bool emulation_required(struct kvm_vcpu *vcpu)
>  	return emulate_invalid_guest_state && !guest_state_valid(vcpu);
>  }
>  
> -static void vmx_decache_cr0_guest_bits(struct kvm_vcpu *vcpu);
> -
>  unsigned long vmx_get_rflags(struct kvm_vcpu *vcpu)
>  {
>  	struct vcpu_vmx *vmx = to_vmx(vcpu);

Reviewed-by: Vitaly Kuznetsov <vkuznets@redhat.com>
diff mbox series

Patch

diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
index 678edbd6e278..061fefc30ecc 100644
--- a/arch/x86/kvm/vmx/vmx.c
+++ b/arch/x86/kvm/vmx/vmx.c
@@ -1428,8 +1428,6 @@  static bool emulation_required(struct kvm_vcpu *vcpu)
 	return emulate_invalid_guest_state && !guest_state_valid(vcpu);
 }
 
-static void vmx_decache_cr0_guest_bits(struct kvm_vcpu *vcpu);
-
 unsigned long vmx_get_rflags(struct kvm_vcpu *vcpu)
 {
 	struct vcpu_vmx *vmx = to_vmx(vcpu);