Patchwork [v6,14/18] block/ssh: drop return_true()

login
register
mail settings
Submitter Stefan Hajnoczi
Date July 25, 2013, 3:18 p.m.
Message ID <1374765505-14356-15-git-send-email-stefanha@redhat.com>
Download mbox | patch
Permalink /patch/261776/
State New
Headers show

Comments

Stefan Hajnoczi - July 25, 2013, 3:18 p.m.
.io_flush() is no longer called so drop return_true().

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
 block/ssh.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)
Wayne Xia - July 29, 2013, 8:25 a.m.
Reviewed-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>

> .io_flush() is no longer called so drop return_true().
> 
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> ---
>   block/ssh.c | 10 +---------
>   1 file changed, 1 insertion(+), 9 deletions(-)
> 
> diff --git a/block/ssh.c b/block/ssh.c
> index d7e7bf8..e149da9 100644
> --- a/block/ssh.c
> +++ b/block/ssh.c
> @@ -740,14 +740,6 @@ static void restart_coroutine(void *opaque)
>       qemu_coroutine_enter(co, NULL);
>   }
> 
> -/* Always true because when we have called set_fd_handler there is
> - * always a request being processed.
> - */
> -static int return_true(void *opaque)
> -{
> -    return 1;
> -}
> -
>   static coroutine_fn void set_fd_handler(BDRVSSHState *s)
>   {
>       int r;
> @@ -766,7 +758,7 @@ static coroutine_fn void set_fd_handler(BDRVSSHState *s)
>       DPRINTF("s->sock=%d rd_handler=%p wr_handler=%p", s->sock,
>               rd_handler, wr_handler);
> 
> -    qemu_aio_set_fd_handler(s->sock, rd_handler, wr_handler, return_true, co);
> +    qemu_aio_set_fd_handler(s->sock, rd_handler, wr_handler, NULL, co);
>   }
> 
>   static coroutine_fn void clear_fd_handler(BDRVSSHState *s)
>

Patch

diff --git a/block/ssh.c b/block/ssh.c
index d7e7bf8..e149da9 100644
--- a/block/ssh.c
+++ b/block/ssh.c
@@ -740,14 +740,6 @@  static void restart_coroutine(void *opaque)
     qemu_coroutine_enter(co, NULL);
 }
 
-/* Always true because when we have called set_fd_handler there is
- * always a request being processed.
- */
-static int return_true(void *opaque)
-{
-    return 1;
-}
-
 static coroutine_fn void set_fd_handler(BDRVSSHState *s)
 {
     int r;
@@ -766,7 +758,7 @@  static coroutine_fn void set_fd_handler(BDRVSSHState *s)
     DPRINTF("s->sock=%d rd_handler=%p wr_handler=%p", s->sock,
             rd_handler, wr_handler);
 
-    qemu_aio_set_fd_handler(s->sock, rd_handler, wr_handler, return_true, co);
+    qemu_aio_set_fd_handler(s->sock, rd_handler, wr_handler, NULL, co);
 }
 
 static coroutine_fn void clear_fd_handler(BDRVSSHState *s)