hv: fix misra-c violations in reused partition mode functions

Fixed violations in vlapic_x2apic_pt_icr_access()
- Procedure has more than one exit point;
- Value is not of appropriate type;
- Narrower init conversion without cast;
- Implicit conversion: actual to formal param (MR)
Fixed violation in switch_apicv_mode_x2apic()
- No space between if, while, for and expresn.

Tracked-On: #861
Signed-off-by: Yan, Like <like.yan@intel.com>
This commit is contained in:
Yan, Like
2019-01-28 19:32:20 +08:00
committed by wenlingz
parent 7d4ba5d7f7
commit b038ade21c
2 changed files with 22 additions and 22 deletions

View File

@@ -563,7 +563,7 @@ void init_vmcs(struct acrn_vcpu *vcpu)
void switch_apicv_mode_x2apic(struct acrn_vcpu *vcpu)
{
uint32_t value32;
if(is_lapic_pt(vcpu->vm)) {
if (is_lapic_pt(vcpu->vm)) {
/*
* Disable external interrupt exiting and irq ack
* Disable posted interrupt processing