mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-06-06 09:06:30 +00:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user