Re: [kvm-unit-tests PATCH] x86/kvmclock_test: fix i386 compilation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Signed-off-by: Andrew Jones <drjones@xxxxxxxxxx>
> ---
>  x86/kvmclock_test.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/x86/kvmclock_test.c b/x86/kvmclock_test.c
> index f729dbecf38e..cbdcaf6961fe 100644
> --- a/x86/kvmclock_test.c
> +++ b/x86/kvmclock_test.c
> @@ -33,7 +33,7 @@ static void wallclock_test(void *data)
>          ksec = ts.tv_sec;
>
>          offset = ksec - sec;
> -        printf("Raw nanoseconds value from kvmclock: %ld (cpu %d)\n", kvm_clock_read(), smp_id());
> +        printf("Raw nanoseconds value from kvmclock: %" PRId64 " (cpu %d)\n", kvm_clock_read(), smp_id());

Looks like the PRId64 here should be PRIu64, as the cycle_t from x86/kvmclock.h uses u64

in x86/kvmclock.h:

14        typedef u64 cycle_t;
39        cycle_t kvm_clock_read();

>          printf("Seconds get from kvmclock: %ld (cpu %d, offset: %ld)\n", ksec, smp_id(), offset);
>
>          if (offset > threshold || offset < -threshold) {
> --
> 2.7.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux