mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-09 04:39:34 +00:00
hv: fix integer violations
The operands to shift operations (<<, >>) shall be unsigned integers. v1 -> v2: * replace 12U with CPU_PAGE_SHIFT when it is address shift case. * replace 6UL with 0x6UL Tracked-On: #861 Signed-off-by: Shiqing Gao <shiqing.gao@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -417,7 +417,7 @@ static void vpic_set_pinstate(struct acrn_vpic *vpic, uint8_t pin,
|
||||
i8259->pin_state[pin & 0x7U] = 0U;
|
||||
}
|
||||
|
||||
lvl_trigger = ((vpic->i8259[pin >> 3U].elc & (1U << (pin & 0x7U))) != 0);
|
||||
lvl_trigger = ((vpic->i8259[pin >> 3U].elc & (1U << (pin & 0x7U))) != 0U);
|
||||
|
||||
if (((old_lvl == 0U) && (level == 1U)) ||
|
||||
((level == 1U) && (lvl_trigger == true))) {
|
||||
@@ -552,7 +552,7 @@ static void vpic_pin_accepted(struct i8259_reg_state *i8259, uint8_t pin)
|
||||
{
|
||||
i8259->intr_raised = false;
|
||||
|
||||
if ((i8259->elc & (1U << pin)) == 0) {
|
||||
if ((i8259->elc & (1U << pin)) == 0U) {
|
||||
/*only used edge trigger mode*/
|
||||
i8259->request &= ~(uint8_t)(1U << pin);
|
||||
}
|
||||
|
Reference in New Issue
Block a user