X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=gettime.c;h=277f2cf87ec16229150651ee85a163ed0b5ce7f4;hp=4c998e5ff89f1dc72503f01f2552cdde78538437;hb=572cfb3f4d2cbf22291b395f2bb41facdc17ce86;hpb=0f78b22cb13d2e59b134ee80bafa669679504bd6 diff --git a/gettime.c b/gettime.c index 4c998e5f..277f2cf8 100644 --- a/gettime.c +++ b/gettime.c @@ -25,7 +25,7 @@ struct tv_valid { int last_tv_valid; }; #ifdef CONFIG_TLS_THREAD -static struct tv_valid __thread static_tv_valid; +static __thread struct tv_valid static_tv_valid; #else static pthread_key_t tv_tls_key; #endif @@ -327,7 +327,7 @@ void fio_local_clock_init(int is_thread) { struct tv_valid *t; - t = calloc(sizeof(*t), 1); + t = calloc(1, sizeof(*t)); if (pthread_setspecific(tv_tls_key, t)) log_err("fio: can't set TLS key\n"); } @@ -578,7 +578,7 @@ int fio_monotonic_clocktest(void) free(threads); if (failed) { - log_err("Clocksource test: %u threads failed\n", failed); + log_err("Clocksource test: %lu threads failed\n", failed); goto err; } @@ -595,9 +595,10 @@ int fio_monotonic_clocktest(void) if (prev->tsc > this->tsc) { uint64_t diff = prev->tsc - this->tsc; - log_info("cs: CPU clock mismatch (diff=%lu):\n", diff); - log_info("\t CPU%3lu: TSC=%lu, SEQ=%lu\n", prev->cpu, prev->tsc, prev->seq); - log_info("\t CPU%3lu: TSC=%lu, SEQ=%lu\n", this->cpu, this->tsc, this->seq); + log_info("cs: CPU clock mismatch (diff=%llu):\n", + (unsigned long long) diff); + log_info("\t CPU%3u: TSC=%llu, SEQ=%u\n", prev->cpu, (unsigned long long) prev->tsc, prev->seq); + log_info("\t CPU%3u: TSC=%llu, SEQ=%u\n", this->cpu, (unsigned long long) this->tsc, this->seq); failed++; }