From: Jens Axboe Date: Wed, 17 Dec 2014 06:03:54 +0000 (-0700) Subject: gettime: cleanup for FIO_DEBUG_TIME X-Git-Tag: fio-2.2.0~4 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=d5e16441bd7727f3e1b90708f957d42a7e47121d gettime: cleanup for FIO_DEBUG_TIME Signed-off-by: Jens Axboe --- diff --git a/gettime.c b/gettime.c index 30513e03..7e3e2e5b 100644 --- a/gettime.c +++ b/gettime.c @@ -65,7 +65,7 @@ static struct gtod_log *find_hash(void *caller) 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 @@ static struct gtod_log *find_log(void *caller) 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)