gettime: cleanup for FIO_DEBUG_TIME
authorJens Axboe <axboe@fb.com>
Wed, 17 Dec 2014 06:03:54 +0000 (23:03 -0700)
committerJens Axboe <axboe@fb.com>
Wed, 17 Dec 2014 06:03:54 +0000 (23:03 -0700)
Signed-off-by: Jens Axboe <axboe@fb.com>
gettime.c

index 30513e03162187c3154b9b9097a201b731bbdde9..7e3e2e5b4375724dcb826c2c34523b994b0d3034 100644 (file)
--- a/gettime.c
+++ b/gettime.c
@@ -65,7 +65,7 @@ static struct gtod_log *find_hash(void *caller)
        return NULL;
 }
 
        return NULL;
 }
 
-static struct gtod_log *find_log(void *caller)
+static void inc_caller(void *caller)
 {
        struct gtod_log *log = find_hash(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]);
        }
 
                flist_add_tail(&log->list, &hash[h]);
        }
 
-       return log;
+       log->calls++;
 }
 
 static void gtod_log_caller(void *caller)
 {
 }
 
 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)
 }
 
 static void fio_exit fio_dump_gtod(void)