Skip to content

Commit b831120

Browse files
yonghuahlijinxia
authored andcommitted
HV: coding style cleanup for TRACE_2L & TRACE_4I usage
to align the data type of parameters Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
1 parent c808972 commit b831120

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

hypervisor/arch/x86/io.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ int io_instr_vmexit_handler(struct vcpu *vcpu)
7373
direction = VM_EXIT_IO_INSTRUCTION_ACCESS_DIRECTION(exit_qual);
7474
mask = 0xfffffffful >> (32 - 8 * sz);
7575

76-
TRACE_4I(TRACE_VMEXIT_IO_INSTRUCTION, port, direction, sz,
77-
cur_context_idx);
76+
TRACE_4I(TRACE_VMEXIT_IO_INSTRUCTION, port, (uint32_t)direction, sz,
77+
(uint32_t)cur_context_idx);
7878

7979
for (handler = vm->arch_vm.io_handler;
8080
handler; handler = handler->next) {

hypervisor/arch/x86/timer.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ static void run_timer(struct timer *timer)
2020
timer->func(timer->priv_data);
2121
}
2222

23-
TRACE_2L(TRACE_TIMER_ACTION_PCKUP, timer->fire_tsc, 0);
23+
TRACE_2L(TRACE_TIMER_ACTION_PCKUP, timer->fire_tsc, 0UL);
2424
}
2525

2626
/* run in interrupt context */
@@ -95,7 +95,7 @@ int add_timer(struct timer *timer)
9595
update_physical_timer(cpu_timer);
9696
}
9797

98-
TRACE_2L(TRACE_TIMER_ACTION_ADDED, timer->fire_tsc, 0);
98+
TRACE_2L(TRACE_TIMER_ACTION_ADDED, timer->fire_tsc, 0UL);
9999
return 0;
100100

101101
}

hypervisor/arch/x86/virq.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ int interrupt_window_vmexit_handler(struct vcpu *vcpu)
310310
{
311311
int value32;
312312

313-
TRACE_2L(TRACE_VMEXIT_INTERRUPT_WINDOW, 0, 0);
313+
TRACE_2L(TRACE_VMEXIT_INTERRUPT_WINDOW, 0UL, 0UL);
314314

315315
if (vcpu == NULL)
316316
return -1;
@@ -353,7 +353,7 @@ int external_interrupt_vmexit_handler(struct vcpu *vcpu)
353353

354354
vcpu_retain_rip(vcpu);
355355

356-
TRACE_2L(TRACE_VMEXIT_EXTERNAL_INTERRUPT, ctx.vector, 0);
356+
TRACE_2L(TRACE_VMEXIT_EXTERNAL_INTERRUPT, ctx.vector, 0UL);
357357

358358
return 0;
359359
}
@@ -490,7 +490,7 @@ int exception_vmexit_handler(struct vcpu *vcpu)
490490
int status = 0;
491491

492492
if (vcpu == NULL) {
493-
TRACE_4I(TRACE_VMEXIT_EXCEPTION_OR_NMI, 0, 0, 0, 0);
493+
TRACE_4I(TRACE_VMEXIT_EXCEPTION_OR_NMI, 0U, 0U, 0U, 0U);
494494
status = -EINVAL;
495495
}
496496

@@ -533,7 +533,7 @@ int exception_vmexit_handler(struct vcpu *vcpu)
533533
}
534534

535535
TRACE_4I(TRACE_VMEXIT_EXCEPTION_OR_NMI,
536-
exception_vector, int_err_code, 2, 0);
536+
exception_vector, int_err_code, 2U, 0U);
537537

538538
return status;
539539
}

hypervisor/arch/x86/vmexit.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ static int unhandled_vmexit_handler(struct vcpu *vcpu)
213213

214214
/* while(1); */
215215

216-
TRACE_2L(TRACE_VMEXIT_UNHANDLED, vcpu->arch_vcpu.exit_reason, 0);
216+
TRACE_2L(TRACE_VMEXIT_UNHANDLED, vcpu->arch_vcpu.exit_reason, 0UL);
217217

218218
return 0;
219219
}

hypervisor/common/hv_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ void vcpu_thread(struct vcpu *vcpu)
6262
per_cpu(vmexit_time, vcpu->pcpu_id)[basic_exit_reason]
6363
+= (vmexit_end - vmexit_begin);
6464
}
65-
TRACE_2L(TRACE_VM_ENTER, 0, 0);
65+
TRACE_2L(TRACE_VM_ENTER, 0UL, 0UL);
6666

6767
/* Restore guest TSC_AUX */
6868
if (vcpu->launched) {

0 commit comments

Comments
 (0)