From 9e0562f4dce11fc7649f63466bd09b02445c83aa Mon Sep 17 00:00:00 2001 From: "Li, Fei1" Date: Thu, 6 Dec 2018 23:24:14 +0800 Subject: [PATCH] hv: add obvious comment for empty else clause following else if Add obvious do nothing comment for empty else clause following else if. Tracked-On: #861 Signed-off-by: Li, Fei1 --- hypervisor/arch/x86/vmx.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hypervisor/arch/x86/vmx.c b/hypervisor/arch/x86/vmx.c index 843b280f6..a77f078af 100644 --- a/hypervisor/arch/x86/vmx.c +++ b/hypervisor/arch/x86/vmx.c @@ -395,6 +395,7 @@ void vmx_write_cr0(struct acrn_vcpu *vcpu, uint64_t cr0) /* enabled PAE from paging disabled */ load_pdptrs(vcpu); } else { + /* do nothing */ } } else if (old_paging_enabled && ((cr0 & CR0_PG) == 0UL)) { if ((vcpu_get_efer(vcpu) & MSR_IA32_EFER_LME_BIT) != 0UL) { @@ -406,8 +407,9 @@ void vmx_write_cr0(struct acrn_vcpu *vcpu, uint64_t cr0) vcpu_set_efer(vcpu, vcpu_get_efer(vcpu) & ~MSR_IA32_EFER_LMA_BIT); - } else { } + } else { + /* do nothing */ } /* If CR0.CD or CR0.NW get cr0_changed_bits */ @@ -422,7 +424,7 @@ void vmx_write_cr0(struct acrn_vcpu *vcpu, uint64_t cr0) * disabled behavior */ exec_vmwrite64(VMX_GUEST_IA32_PAT_FULL, PAT_ALL_UC_VALUE); - if(!iommu_snoop_supported(vcpu->vm)) { + if (!iommu_snoop_supported(vcpu->vm)) { cache_flush_invalidate_all(); } } else {