mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-08-13 05:47:39 +00:00
hv: remove the unnecessary equality operation
This patch removes the unnecessary equality operation for boolean variables. Tracked-On: #861 Signed-off-by: Shiqing Gao <shiqing.gao@intel.com>
This commit is contained in:
parent
ede1459e19
commit
a7e112813c
@ -433,8 +433,7 @@ static void vpic_set_pinstate(struct acrn_vpic *vpic, uint32_t pin, uint8_t leve
|
|||||||
|
|
||||||
lvl_trigger = ((vpic->i8259[pin >> 3U].elc & (1U << (pin & 0x7U))) != 0U);
|
lvl_trigger = ((vpic->i8259[pin >> 3U].elc & (1U << (pin & 0x7U))) != 0U);
|
||||||
|
|
||||||
if (((old_lvl == 0U) && (level == 1U)) ||
|
if (((old_lvl == 0U) && (level == 1U)) || ((level == 1U) && lvl_trigger)) {
|
||||||
((level == 1U) && (lvl_trigger == true))) {
|
|
||||||
/* raising edge or level */
|
/* raising edge or level */
|
||||||
dev_dbg(ACRN_DBG_PIC, "pic pin%hhu: asserted\n", pin);
|
dev_dbg(ACRN_DBG_PIC, "pic pin%hhu: asserted\n", pin);
|
||||||
i8259->request |= (uint8_t)(1U << (pin & 0x7U));
|
i8259->request |= (uint8_t)(1U << (pin & 0x7U));
|
||||||
@ -576,8 +575,8 @@ static void vpic_pin_accepted(struct i8259_reg_state *i8259, uint32_t pin)
|
|||||||
i8259->request &= ~(uint8_t)(1U << pin);
|
i8259->request &= ~(uint8_t)(1U << pin);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i8259->aeoi == true) {
|
if (i8259->aeoi) {
|
||||||
if (i8259->rotate == true) {
|
if (i8259->rotate) {
|
||||||
i8259->lowprio = pin;
|
i8259->lowprio = pin;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user