KVM : remove redundant assignment of var new_entry
diff mbox series

Message ID 20190812023300.20153-1-linmiaohe@huawei.com
State New
Headers show
Series
  • KVM : remove redundant assignment of var new_entry
Related show

Commit Message

Miaohe Lin Aug. 12, 2019, 2:33 a.m. UTC
new_entry is reassigned a new value next line. So
it's redundant and remove it.

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

Comments

Paolo Bonzini Aug. 14, 2019, 12:41 p.m. UTC | #1
On 12/08/19 04:33, Miaohe Lin wrote:
> new_entry is reassigned a new value next line. So
> it's redundant and remove it.
> 
> Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
> ---
>  arch/x86/kvm/svm.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
> index d685491fce4d..e3d3b2128f2b 100644
> --- a/arch/x86/kvm/svm.c
> +++ b/arch/x86/kvm/svm.c
> @@ -1714,7 +1714,6 @@ static int avic_init_backing_page(struct kvm_vcpu *vcpu)
>  	if (!entry)
>  		return -EINVAL;
>  
> -	new_entry = READ_ONCE(*entry);
>  	new_entry = __sme_set((page_to_phys(svm->avic_backing_page) &
>  			      AVIC_PHYSICAL_ID_ENTRY_BACKING_PAGE_MASK) |
>  			      AVIC_PHYSICAL_ID_ENTRY_VALID_MASK);
> 

Queued, thanks.

Paolo

Patch
diff mbox series

diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index d685491fce4d..e3d3b2128f2b 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -1714,7 +1714,6 @@  static int avic_init_backing_page(struct kvm_vcpu *vcpu)
 	if (!entry)
 		return -EINVAL;
 
-	new_entry = READ_ONCE(*entry);
 	new_entry = __sme_set((page_to_phys(svm->avic_backing_page) &
 			      AVIC_PHYSICAL_ID_ENTRY_BACKING_PAGE_MASK) |
 			      AVIC_PHYSICAL_ID_ENTRY_VALID_MASK);