null: drop unneeded casts from void* to non-void*
authorTomohiro Kusumi <tkusumi@tuxera.com>
Mon, 15 Jan 2018 19:52:12 +0000 (21:52 +0200)
committerJens Axboe <axboe@kernel.dk>
Tue, 16 Jan 2018 15:32:39 +0000 (08:32 -0700)
Some functions in null ioengine are used by C/C++ (e.g. null_init()
which calls malloc(3)), but C specific ones (not __cplusplus) don't
need explicit cast from void* to non-void*, and one usually doesn't.

Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
engines/null.c

index cf1ee1f2e433cd92836725d991c849e70769a991..0cfc22ad9e04d72ac8b1cc64e0b7fc958a4b2bdf 100644 (file)
@@ -106,34 +106,34 @@ static struct null_data *null_init(struct thread_data *td)
 
 static struct io_u *fio_null_event(struct thread_data *td, int event)
 {
-       return null_event((struct null_data *)td->io_ops_data, event);
+       return null_event(td->io_ops_data, event);
 }
 
 static int fio_null_getevents(struct thread_data *td, unsigned int min_events,
                              unsigned int max, const struct timespec *t)
 {
-       struct null_data *nd = (struct null_data *)td->io_ops_data;
+       struct null_data *nd = td->io_ops_data;
        return null_getevents(nd, min_events, max, t);
 }
 
 static int fio_null_commit(struct thread_data *td)
 {
-       return null_commit(td, (struct null_data *)td->io_ops_data);
+       return null_commit(td, td->io_ops_data);
 }
 
 static int fio_null_queue(struct thread_data *td, struct io_u *io_u)
 {
-       return null_queue(td, (struct null_data *)td->io_ops_data, io_u);
+       return null_queue(td, td->io_ops_data, io_u);
 }
 
 static int fio_null_open(struct thread_data *td, struct fio_file *f)
 {
-       return null_open((struct null_data *)td->io_ops_data, f);
+       return null_open(td->io_ops_data, f);
 }
 
 static void fio_null_cleanup(struct thread_data *td)
 {
-       null_cleanup((struct null_data *)td->io_ops_data);
+       null_cleanup(td->io_ops_data);
 }
 
 static int fio_null_init(struct thread_data *td)