gettime: cleanup for FIO_DEBUG_TIME
Signed-off-by: Jens Axboe <axboe@fb.com>
diff --git a/gettime.c b/gettime.c
index 30513e0..7e3e2e5 100644
--- a/gettime.c
+++ b/gettime.c
@@ -65,7 +65,7 @@
return NULL;
}
-static struct gtod_log *find_log(void *caller)
+static void inc_caller(void *caller)
{
struct gtod_log *log = find_hash(caller);
@@ -81,16 +81,13 @@
flist_add_tail(&log->list, &hash[h]);
}
- return log;
+ log->calls++;
}
static void gtod_log_caller(void *caller)
{
- if (gtod_inited) {
- struct gtod_log *log = find_log(caller);
-
- log->calls++;
- }
+ if (gtod_inited)
+ inc_caller(caller);
}
static void fio_exit fio_dump_gtod(void)