HV: Avoiding the chained assignment

To follow the Misra C standard, doing one assignment per line to
make code is clearly readable and reduces the confusion of its
intetion or typo.

Signed-off-by: Yang, Yu-chu <yu-chu.yang@intel.com>
This commit is contained in:
Yang, Yu-chu
2018-07-06 15:00:39 -07:00
committed by lijinxia
parent cfca49d7c6
commit e7aa00b83a
6 changed files with 23 additions and 11 deletions

View File

@@ -164,7 +164,8 @@ int set_vcpuid_entries(struct vm *vm)
result = set_vcpuid_entry(vm, &entry);
if (result != 0)
return result;
vm->vcpuid_level = limit = entry.eax;
limit = entry.eax;
vm->vcpuid_level = limit;
for (i = 1U; i <= limit; i++) {
/* cpuid 1/0xb is percpu related */
@@ -235,7 +236,8 @@ int set_vcpuid_entries(struct vm *vm)
if (result != 0)
return result;
vm->vcpuid_xlevel = limit = entry.eax;
limit = entry.eax;
vm->vcpuid_xlevel = limit;
for (i = 0x80000001U; i <= limit; i++) {
init_vcpuid_entry(vm, i, 0U, 0U, &entry);
result = set_vcpuid_entry(vm, &entry);