Patchwork [04/17] aio: change qemu_aio_set_fd_handler to return void

login
register
mail settings
Submitter Paolo Bonzini
Date Sept. 25, 2012, 12:55 p.m.
Message ID <1348577763-12920-5-git-send-email-pbonzini@redhat.com>
Download mbox | patch
Permalink /patch/186806/
State New
Headers show

Comments

Paolo Bonzini - Sept. 25, 2012, 12:55 p.m.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 aio.c      | 12 +++++-------
 qemu-aio.h | 10 +++++-----
 2 file modificati, 10 inserzioni(+), 12 rimozioni(-)
Anthony Liguori - Sept. 25, 2012, 9:47 p.m.
Paolo Bonzini <pbonzini@redhat.com> writes:

> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>

Regards,

Anthony Liguori

> ---
>  aio.c      | 12 +++++-------
>  qemu-aio.h | 10 +++++-----
>  2 file modificati, 10 inserzioni(+), 12 rimozioni(-)
>
> diff --git a/aio.c b/aio.c
> index c738a4e..e062aab 100644
> --- a/aio.c
> +++ b/aio.c
> @@ -53,11 +53,11 @@ static AioHandler *find_aio_handler(int fd)
>      return NULL;
>  }
>  
> -int qemu_aio_set_fd_handler(int fd,
> -                            IOHandler *io_read,
> -                            IOHandler *io_write,
> -                            AioFlushHandler *io_flush,
> -                            void *opaque)
> +void qemu_aio_set_fd_handler(int fd,
> +                             IOHandler *io_read,
> +                             IOHandler *io_write,
> +                             AioFlushHandler *io_flush,
> +                             void *opaque)
>  {
>      AioHandler *node;
>  
> @@ -93,8 +93,6 @@ int qemu_aio_set_fd_handler(int fd,
>      }
>  
>      qemu_set_fd_handler2(fd, NULL, io_read, io_write, opaque);
> -
> -    return 0;
>  }
>  
>  void qemu_aio_flush(void)
> diff --git a/qemu-aio.h b/qemu-aio.h
> index bfdd35f..27a7e21 100644
> --- a/qemu-aio.h
> +++ b/qemu-aio.h
> @@ -60,10 +60,10 @@ bool qemu_aio_wait(void);
>   * Code that invokes AIO completion functions should rely on this function
>   * instead of qemu_set_fd_handler[2].
>   */
> -int qemu_aio_set_fd_handler(int fd,
> -                            IOHandler *io_read,
> -                            IOHandler *io_write,
> -                            AioFlushHandler *io_flush,
> -                            void *opaque);
> +void qemu_aio_set_fd_handler(int fd,
> +                             IOHandler *io_read,
> +                             IOHandler *io_write,
> +                             AioFlushHandler *io_flush,
> +                             void *opaque);
>  
>  #endif
> -- 
> 1.7.12

Patch

diff --git a/aio.c b/aio.c
index c738a4e..e062aab 100644
--- a/aio.c
+++ b/aio.c
@@ -53,11 +53,11 @@  static AioHandler *find_aio_handler(int fd)
     return NULL;
 }
 
-int qemu_aio_set_fd_handler(int fd,
-                            IOHandler *io_read,
-                            IOHandler *io_write,
-                            AioFlushHandler *io_flush,
-                            void *opaque)
+void qemu_aio_set_fd_handler(int fd,
+                             IOHandler *io_read,
+                             IOHandler *io_write,
+                             AioFlushHandler *io_flush,
+                             void *opaque)
 {
     AioHandler *node;
 
@@ -93,8 +93,6 @@  int qemu_aio_set_fd_handler(int fd,
     }
 
     qemu_set_fd_handler2(fd, NULL, io_read, io_write, opaque);
-
-    return 0;
 }
 
 void qemu_aio_flush(void)
diff --git a/qemu-aio.h b/qemu-aio.h
index bfdd35f..27a7e21 100644
--- a/qemu-aio.h
+++ b/qemu-aio.h
@@ -60,10 +60,10 @@  bool qemu_aio_wait(void);
  * Code that invokes AIO completion functions should rely on this function
  * instead of qemu_set_fd_handler[2].
  */
-int qemu_aio_set_fd_handler(int fd,
-                            IOHandler *io_read,
-                            IOHandler *io_write,
-                            AioFlushHandler *io_flush,
-                            void *opaque);
+void qemu_aio_set_fd_handler(int fd,
+                             IOHandler *io_read,
+                             IOHandler *io_write,
+                             AioFlushHandler *io_flush,
+                             void *opaque);
 
 #endif