mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-06-09 02:24:45 +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:
@@ -248,8 +248,8 @@ vioapic_read(struct vioapic *vioapic, uint32_t addr)
|
||||
}
|
||||
|
||||
/* redirection table entries */
|
||||
if (regnum >= IOAPIC_REDTBL &&
|
||||
(regnum < IOAPIC_REDTBL + (uint32_t)pincount * 2U) != 0) {
|
||||
if ((regnum >= IOAPIC_REDTBL) &&
|
||||
(regnum < (IOAPIC_REDTBL + ((uint32_t)pincount * 2U)))) {
|
||||
uint32_t addr_offset = regnum - IOAPIC_REDTBL;
|
||||
uint32_t rte_offset = addr_offset / 2U;
|
||||
pin = (uint8_t)rte_offset;
|
||||
@@ -323,8 +323,8 @@ vioapic_write(struct vioapic *vioapic, uint32_t addr, uint32_t data)
|
||||
}
|
||||
|
||||
/* redirection table entries */
|
||||
if (regnum >= IOAPIC_REDTBL &&
|
||||
(regnum < IOAPIC_REDTBL + (uint32_t)pincount * 2U) != 0U) {
|
||||
if ((regnum >= IOAPIC_REDTBL) &&
|
||||
(regnum < (IOAPIC_REDTBL + ((uint32_t)pincount * 2U)))) {
|
||||
uint32_t addr_offset = regnum - IOAPIC_REDTBL;
|
||||
uint32_t rte_offset = addr_offset / 2U;
|
||||
pin = (uint8_t)rte_offset;
|
||||
|
||||
Reference in New Issue
Block a user