mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-04 18:30:18 +00:00
hv: vlapic: fix "Procedure has more than one exit point"
IEC 61508,ISO 26262 standards highly recommend single-exit rule. Reduce the count of the "return entries". Fix the violations which is comply with the cases list below: 1.Function has 2 return entries. 2.The first return entry is used to return the error code of checking variable whether is valid. Fix the violations in "if else" format. Tracked-On: #861 Signed-off-by: Huihuang Shi <huihuang.shi@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -231,7 +231,7 @@ vlapic_intr_edge(struct acrn_vcpu *vcpu, uint32_t vector)
|
||||
*
|
||||
* @pre vm != NULL
|
||||
*/
|
||||
int vlapic_set_local_intr(struct acrn_vm *vm, uint16_t vcpu_id_arg, uint32_t vector);
|
||||
int32_t vlapic_set_local_intr(struct acrn_vm *vm, uint16_t vcpu_id_arg, uint32_t vector);
|
||||
|
||||
/**
|
||||
* @brief Inject MSI to target VM.
|
||||
@@ -245,7 +245,7 @@ int vlapic_set_local_intr(struct acrn_vm *vm, uint16_t vcpu_id_arg, uint32_t vec
|
||||
*
|
||||
* @pre vm != NULL
|
||||
*/
|
||||
int vlapic_intr_msi(struct acrn_vm *vm, uint64_t addr, uint64_t msg);
|
||||
int32_t vlapic_intr_msi(struct acrn_vm *vm, uint64_t addr, uint64_t msg);
|
||||
|
||||
void vlapic_deliver_intr(struct acrn_vm *vm, bool level, uint32_t dest,
|
||||
bool phys, uint32_t delmode, uint32_t vec, bool rh);
|
||||
|
Reference in New Issue
Block a user