HV:treewide: Clean up -1U or -1UL

According to C99 standard, -1 integer constant with 'U/UL'
suffix has no type.

To explicit the integer constant:
Update -1U or -1UL as ~0U or ~0UL, or invalid number according
to usage case.

V1-->V2:
	Update parameter name and type of send_startup_ipi since
	the second parameter is used as pcpu_id;
	Update related comments for code clearity.
V2-->V3:
	Update comments of struct acrn_irqline;
	rename  cpu_startup_dest as dest_pcpu_id in the second
	parameter of send_startup_ipi.

Tracked-on: ccm0001001-247033
Signed-off-by: Xiangyang Wu <xiangyang.wu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Xiangyang Wu
2018-07-06 16:08:33 +08:00
committed by lijinxia
parent de5bb50545
commit 49d1dc1534
9 changed files with 18 additions and 15 deletions

View File

@@ -105,8 +105,8 @@ static int handle_virt_irqline(struct vm *vm, uint64_t target_vmid,
/* Call vpic for pic injection */
ret = handle_vpic_irqline(target_vm, param->pic_irq, mode);
/* call vioapic for ioapic injection if ioapic_irq != -1*/
if (param->ioapic_irq != -1UL) {
/* call vioapic for ioapic injection if ioapic_irq != ~0UL*/
if (param->ioapic_irq != (~0UL)) {
/* handle IOAPIC irqline */
ret = handle_vioapic_irqline(target_vm,
param->ioapic_irq, mode);