Skip to content

Commit f0617e4

Browse files
xiaobo55xavpatel
authored andcommitted
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 <[email protected]> Signed-off-by: Haibo Xu <[email protected]> Reviewed-by: Andrew Jones <[email protected]> Reviewed-by: Marc Zyngier <[email protected]> Signed-off-by: Anup Patel <[email protected]>
1 parent 2c5af1c commit f0617e4

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

tools/testing/selftests/kvm/aarch64/arch_timer.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@
4242
#define TIMER_TEST_MIGRATION_FREQ_MS 2
4343

4444
struct test_args {
45-
int nr_vcpus;
46-
int nr_iter;
47-
int timer_period_ms;
48-
int migration_freq_ms;
45+
uint32_t nr_vcpus;
46+
uint32_t nr_iter;
47+
uint32_t timer_period_ms;
48+
uint32_t migration_freq_ms;
4949
struct kvm_arm_counter_offset offset;
5050
};
5151

@@ -57,7 +57,7 @@ static struct test_args test_args = {
5757
.offset = { .reserved = 1 },
5858
};
5959

60-
#define msecs_to_usecs(msec) ((msec) * 1000LL)
60+
#define msecs_to_usecs(msec) ((msec) * 1000ULL)
6161

6262
#define GICD_BASE_GPA 0x8000000ULL
6363
#define GICR_BASE_GPA 0x80A0000ULL
@@ -72,7 +72,7 @@ enum guest_stage {
7272

7373
/* Shared variables between host and guest */
7474
struct test_vcpu_shared_data {
75-
int nr_iter;
75+
uint32_t nr_iter;
7676
enum guest_stage guest_stage;
7777
uint64_t xcnt;
7878
};

0 commit comments

Comments
 (0)