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

@@ -327,11 +327,11 @@ vioapic_write(struct vioapic *vioapic, uint32_t addr, uint32_t data)
else
lshift = 0;
last = new = vioapic->rtbl[pin].reg;
last = vioapic->rtbl[pin].reg;
data64 = (uint64_t)data << lshift;
mask64 = (uint64_t)0xffffffff << lshift;
new &= ~mask64 | RTBL_RO_BITS;
new = last & (~mask64 | RTBL_RO_BITS);
new |= data64 & ~RTBL_RO_BITS;
changed = last ^ new;