Commit 2ce7a6c7 authored by Radim Krčmář's avatar Radim Krčmář
Browse files

fix conversions in report()s



Fix conversions that would trigger a warning if the format was checked
by a compiler.
Reviewed-by: default avatarThomas Huth <thuth@redhat.com>
Reviewed-by: default avatarDavid Hildenbrand <david@redhat.com>
Signed-off-by: default avatarRadim Krčmář <rkrcmar@redhat.com>
parent 7f22a57e
......@@ -37,7 +37,7 @@ static void check_setup(int argc, char **argv)
phys_addr_t memsize = PHYS_END - PHYS_OFFSET;
phys_addr_t expected = ((phys_addr_t)val)*1024*1024;
report("size = %d MB", memsize == expected,
report("size = %" PRIu64 " MB", memsize == expected,
memsize/1024/1024);
++nr_tests;
......
......@@ -28,7 +28,7 @@ static void check_setup(int argc, char **argv)
phys_addr_t memsize = PHYSICAL_END - PHYSICAL_START;
phys_addr_t expected = ((phys_addr_t)val)*1024*1024;
report("size = %d MB", memsize == expected,
report("size = %" PRIu64 " MB", memsize == expected,
memsize/1024/1024);
++nr_tests;
......
......@@ -49,7 +49,7 @@ static void test_h_set_sprg0(int argc, char **argv)
rc = hcall(H_SET_SPRG0, sprg0_orig);
sprg0 = mfspr(SPR_SPRG0);
report("sprg0 = 0x%llx",
report("sprg0 = 0x%" PRIx64,
rc == H_SUCCESS && sprg0 == sprg0_orig, sprg0_orig);
}
......
......@@ -52,13 +52,13 @@ static void pf_isr(struct ex_regs *r)
switch (reason) {
case 0:
report("unexpected #PF at %p", false, read_cr2());
report("unexpected #PF at 0x%lx", false, read_cr2());
break;
case KVM_PV_REASON_PAGE_NOT_PRESENT:
phys = virt_to_phys_cr3(virt);
install_pte(phys_to_virt(read_cr3()), 1, virt, phys, 0);
write_cr3(read_cr3());
report("Got not present #PF token %x virt addr %p phys addr %p",
report("Got not present #PF token %lx virt addr %p phys addr 0x%" PRIx64,
true, read_cr2(), virt, phys);
while(phys) {
safe_halt(); /* enables irq */
......@@ -66,7 +66,7 @@ static void pf_isr(struct ex_regs *r)
}
break;
case KVM_PV_REASON_PAGE_READY:
report("Got present #PF token %x", true, read_cr2());
report("Got present #PF token %lx", true, read_cr2());
if ((uint32_t)read_cr2() == ~0)
break;
install_pte(phys_to_virt(read_cr3()), 1, virt, phys | PT_PRESENT_MASK | PT_WRITABLE_MASK, 0);
......
......@@ -90,7 +90,7 @@ static void synic_test_prepare(void *ctx)
}
r = rdmsr(HV_X64_MSR_EOM);
if (r != 0) {
report("Hyper-V SynIC test, EOM read 0x%llx", false, r);
report("Hyper-V SynIC test, EOM read 0x%" PRIx64, false, r);
goto ret;
}
......
......@@ -23,7 +23,7 @@ void test_rdtscp(u64 aux)
wrmsr(MSR_TSC_AUX, aux);
rdtscp(&ecx);
report("Test RDTSCP %d", ecx == aux, aux);
report("Test RDTSCP %" PRIu64, ecx == aux, aux);
}
int main()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment