From b831120165921d999706368b7f37c4fe4182e4d6 Mon Sep 17 00:00:00 2001 From: Yonghua Huang Date: Sat, 14 Jul 2018 01:49:40 +0800 Subject: [PATCH] HV: coding style cleanup for TRACE_2L & TRACE_4I usage to align the data type of parameters Signed-off-by: Yonghua Huang --- hypervisor/arch/x86/io.c | 4 ++-- hypervisor/arch/x86/timer.c | 4 ++-- hypervisor/arch/x86/virq.c | 8 ++++---- hypervisor/arch/x86/vmexit.c | 2 +- hypervisor/common/hv_main.c | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/hypervisor/arch/x86/io.c b/hypervisor/arch/x86/io.c index 0d32fbaa8..9b5012720 100644 --- a/hypervisor/arch/x86/io.c +++ b/hypervisor/arch/x86/io.c @@ -73,8 +73,8 @@ int io_instr_vmexit_handler(struct vcpu *vcpu) direction = VM_EXIT_IO_INSTRUCTION_ACCESS_DIRECTION(exit_qual); mask = 0xfffffffful >> (32 - 8 * sz); - TRACE_4I(TRACE_VMEXIT_IO_INSTRUCTION, port, direction, sz, - cur_context_idx); + TRACE_4I(TRACE_VMEXIT_IO_INSTRUCTION, port, (uint32_t)direction, sz, + (uint32_t)cur_context_idx); for (handler = vm->arch_vm.io_handler; handler; handler = handler->next) { diff --git a/hypervisor/arch/x86/timer.c b/hypervisor/arch/x86/timer.c index 7f15bd376..197fcd22b 100644 --- a/hypervisor/arch/x86/timer.c +++ b/hypervisor/arch/x86/timer.c @@ -20,7 +20,7 @@ static void run_timer(struct timer *timer) timer->func(timer->priv_data); } - TRACE_2L(TRACE_TIMER_ACTION_PCKUP, timer->fire_tsc, 0); + TRACE_2L(TRACE_TIMER_ACTION_PCKUP, timer->fire_tsc, 0UL); } /* run in interrupt context */ @@ -95,7 +95,7 @@ int add_timer(struct timer *timer) update_physical_timer(cpu_timer); } - TRACE_2L(TRACE_TIMER_ACTION_ADDED, timer->fire_tsc, 0); + TRACE_2L(TRACE_TIMER_ACTION_ADDED, timer->fire_tsc, 0UL); return 0; } diff --git a/hypervisor/arch/x86/virq.c b/hypervisor/arch/x86/virq.c index bd85b35fa..6ea82b26b 100644 --- a/hypervisor/arch/x86/virq.c +++ b/hypervisor/arch/x86/virq.c @@ -310,7 +310,7 @@ int interrupt_window_vmexit_handler(struct vcpu *vcpu) { int value32; - TRACE_2L(TRACE_VMEXIT_INTERRUPT_WINDOW, 0, 0); + TRACE_2L(TRACE_VMEXIT_INTERRUPT_WINDOW, 0UL, 0UL); if (vcpu == NULL) return -1; @@ -353,7 +353,7 @@ int external_interrupt_vmexit_handler(struct vcpu *vcpu) vcpu_retain_rip(vcpu); - TRACE_2L(TRACE_VMEXIT_EXTERNAL_INTERRUPT, ctx.vector, 0); + TRACE_2L(TRACE_VMEXIT_EXTERNAL_INTERRUPT, ctx.vector, 0UL); return 0; } @@ -490,7 +490,7 @@ int exception_vmexit_handler(struct vcpu *vcpu) int status = 0; if (vcpu == NULL) { - TRACE_4I(TRACE_VMEXIT_EXCEPTION_OR_NMI, 0, 0, 0, 0); + TRACE_4I(TRACE_VMEXIT_EXCEPTION_OR_NMI, 0U, 0U, 0U, 0U); status = -EINVAL; } @@ -533,7 +533,7 @@ int exception_vmexit_handler(struct vcpu *vcpu) } TRACE_4I(TRACE_VMEXIT_EXCEPTION_OR_NMI, - exception_vector, int_err_code, 2, 0); + exception_vector, int_err_code, 2U, 0U); return status; } diff --git a/hypervisor/arch/x86/vmexit.c b/hypervisor/arch/x86/vmexit.c index 88a61cc73..77fbb8928 100644 --- a/hypervisor/arch/x86/vmexit.c +++ b/hypervisor/arch/x86/vmexit.c @@ -213,7 +213,7 @@ static int unhandled_vmexit_handler(struct vcpu *vcpu) /* while(1); */ - TRACE_2L(TRACE_VMEXIT_UNHANDLED, vcpu->arch_vcpu.exit_reason, 0); + TRACE_2L(TRACE_VMEXIT_UNHANDLED, vcpu->arch_vcpu.exit_reason, 0UL); return 0; } diff --git a/hypervisor/common/hv_main.c b/hypervisor/common/hv_main.c index ba0f8b3e3..19ce813bb 100644 --- a/hypervisor/common/hv_main.c +++ b/hypervisor/common/hv_main.c @@ -62,7 +62,7 @@ void vcpu_thread(struct vcpu *vcpu) per_cpu(vmexit_time, vcpu->pcpu_id)[basic_exit_reason] += (vmexit_end - vmexit_begin); } - TRACE_2L(TRACE_VM_ENTER, 0, 0); + TRACE_2L(TRACE_VM_ENTER, 0UL, 0UL); /* Restore guest TSC_AUX */ if (vcpu->launched) {