mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-24 02:08:04 +00:00
HV: logical and high level precedence expression needs brackets
Added brackets for expression to make it easy to understand and reduce the mistake of precedence. The rule is applied to the mixed same level of prevedence opeartors, high level presedence operators and logical expression. Signed-off-by: Yang, Yu-chu <yu-chu.yang@intel.com> Acked-by: Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
@@ -146,7 +146,7 @@ static inline void
|
||||
ioapic_get_rte_entry(void *ioapic_addr,
|
||||
uint8_t pin, union ioapic_rte *rte)
|
||||
{
|
||||
uint32_t rte_addr = (uint32_t)pin * 2U + 0x10U;
|
||||
uint32_t rte_addr = ((uint32_t)pin * 2U) + 0x10U;
|
||||
rte->u.lo_32 = ioapic_read_reg32(ioapic_addr, rte_addr);
|
||||
rte->u.hi_32 = ioapic_read_reg32(ioapic_addr, rte_addr + 1U);
|
||||
}
|
||||
@@ -155,7 +155,7 @@ static inline void
|
||||
ioapic_set_rte_entry(void *ioapic_addr,
|
||||
uint8_t pin, union ioapic_rte rte)
|
||||
{
|
||||
uint32_t rte_addr = (uint32_t)pin * 2U + 0x10U;
|
||||
uint32_t rte_addr = ((uint32_t)pin * 2U) + 0x10U;
|
||||
ioapic_write_reg32(ioapic_addr, rte_addr, rte.u.lo_32);
|
||||
ioapic_write_reg32(ioapic_addr, rte_addr + 1U, rte.u.hi_32);
|
||||
}
|
||||
|
Reference in New Issue
Block a user