KVM Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] KVM : remove redundant assignment of var new_entry
@ 2019-08-12  2:33 Miaohe Lin
  2019-08-14 12:41 ` Paolo Bonzini
  0 siblings, 1 reply; 2+ messages in thread
From: Miaohe Lin @ 2019-08-12  2:33 UTC (permalink / raw)
  To: joro, pbonzini, rkrcmar, tglx, mingo, bp, hpa, x86, kvm, linux-kernel
  Cc: linmiaohe, mingfangsen

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);
-- 
2.21.GIT


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] KVM : remove redundant assignment of var new_entry
  2019-08-12  2:33 [PATCH] KVM : remove redundant assignment of var new_entry Miaohe Lin
@ 2019-08-14 12:41 ` Paolo Bonzini
  0 siblings, 0 replies; 2+ messages in thread
From: Paolo Bonzini @ 2019-08-14 12:41 UTC (permalink / raw)
  To: Miaohe Lin, joro, rkrcmar, tglx, mingo, bp, hpa, x86, kvm, linux-kernel
  Cc: mingfangsen

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-12  2:33 [PATCH] KVM : remove redundant assignment of var new_entry Miaohe Lin
2019-08-14 12:41 ` Paolo Bonzini

KVM Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/kvm/0 kvm/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 kvm kvm/ https://lore.kernel.org/kvm \
		kvm@vger.kernel.org kvm@archiver.kernel.org
	public-inbox-index kvm


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.kvm


AGPL code for this site: git clone https://public-inbox.org/ public-inbox