mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-01-04 15:14:27 +00:00
hv: fix 'No brackets to then/else'
- add missing brackets for 'if/else' statements based on MISRA-C requirements v1 -> v2: * add brackets for each conditions in 'if' statements to improve the readability * modify 'ptdev_init' to make the logic clearer Tracked-On: #861 Signed-off-by: Shiqing Gao <shiqing.gao@intel.com>
This commit is contained in:
@@ -127,8 +127,9 @@ release_all_entries(struct vm *vm)
|
||||
list_for_each_safe(pos, tmp, &ptdev_list) {
|
||||
entry = list_entry(pos, struct ptdev_remapping_info,
|
||||
entry_node);
|
||||
if (entry->vm == vm)
|
||||
if (entry->vm == vm) {
|
||||
release_entry(entry);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -191,8 +192,9 @@ ptdev_deactivate_entry(struct ptdev_remapping_info *entry)
|
||||
|
||||
void ptdev_init(void)
|
||||
{
|
||||
if (get_cpu_id() > 0)
|
||||
if (get_cpu_id() != BOOT_CPU_ID) {
|
||||
return;
|
||||
}
|
||||
|
||||
INIT_LIST_HEAD(&ptdev_list);
|
||||
spinlock_init(&ptdev_lock);
|
||||
|
||||
Reference in New Issue
Block a user