From: Jens Axboe Date: Fri, 4 Feb 2022 16:02:49 +0000 (-0700) Subject: t/io_uring: fix warnings for !ARCH_HAVE_CPU_CLOCK X-Git-Tag: fio-3.30~53 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=b65c1fc07d4794920224312c56c785de2f3f1692;p=fio.git t/io_uring: fix warnings for !ARCH_HAVE_CPU_CLOCK Signed-off-by: Jens Axboe --- diff --git a/t/io_uring.c b/t/io_uring.c index e8365a79..faf5978c 100644 --- a/t/io_uring.c +++ b/t/io_uring.c @@ -287,6 +287,7 @@ out: free(ovals); } +#ifdef ARCH_HAVE_CPU_CLOCK static unsigned int plat_val_to_idx(unsigned long val) { unsigned int msb, error_bits, base, offset, idx; @@ -322,6 +323,7 @@ static unsigned int plat_val_to_idx(unsigned long val) return idx; } +#endif static void add_stat(struct submitter *s, int clock_index, int nr) { @@ -789,9 +791,12 @@ static void *submitter_uring_fn(void *data) { struct submitter *s = data; struct io_sq_ring *ring = &s->sq_ring; - int ret, prepped, nr_batch; - - nr_batch = submitter_init(s); + int ret, prepped; +#ifdef ARCH_HAVE_CPU_CLOCK + int nr_batch = submitter_init(s); +#else + submitter_init(s); +#endif prepped = 0; do {