From: Haibo Xu Date: Mon, 22 Jan 2024 09:58:32 +0000 (+0800) Subject: KVM: arm64: selftests: Data type cleanup for arch_timer test X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=f0617e4ac2b2fb69369486e09d0ce7653cd94985;p=linux.git KVM: arm64: selftests: Data type cleanup for arch_timer test Change signed type to unsigned in test_args struct which only make sense for unsigned value. Suggested-by: Andrew Jones Signed-off-by: Haibo Xu Reviewed-by: Andrew Jones Reviewed-by: Marc Zyngier Signed-off-by: Anup Patel --- diff --git a/tools/testing/selftests/kvm/aarch64/arch_timer.c b/tools/testing/selftests/kvm/aarch64/arch_timer.c index 2cb8dd1f8275f..27191217f117f 100644 --- a/tools/testing/selftests/kvm/aarch64/arch_timer.c +++ b/tools/testing/selftests/kvm/aarch64/arch_timer.c @@ -42,10 +42,10 @@ #define TIMER_TEST_MIGRATION_FREQ_MS 2 struct test_args { - int nr_vcpus; - int nr_iter; - int timer_period_ms; - int migration_freq_ms; + uint32_t nr_vcpus; + uint32_t nr_iter; + uint32_t timer_period_ms; + uint32_t migration_freq_ms; struct kvm_arm_counter_offset offset; }; @@ -57,7 +57,7 @@ static struct test_args test_args = { .offset = { .reserved = 1 }, }; -#define msecs_to_usecs(msec) ((msec) * 1000LL) +#define msecs_to_usecs(msec) ((msec) * 1000ULL) #define GICD_BASE_GPA 0x8000000ULL #define GICR_BASE_GPA 0x80A0000ULL @@ -72,7 +72,7 @@ enum guest_stage { /* Shared variables between host and guest */ struct test_vcpu_shared_data { - int nr_iter; + uint32_t nr_iter; enum guest_stage guest_stage; uint64_t xcnt; };