]> www.infradead.org Git - users/dwmw2/qemu.git/commitdiff
migration/multifd: Make multifd_channel_connect() return void
authorPeter Xu <peterx@redhat.com>
Thu, 22 Feb 2024 09:52:59 +0000 (17:52 +0800)
committerPeter Xu <peterx@redhat.com>
Wed, 28 Feb 2024 03:31:28 +0000 (11:31 +0800)
It never fails, drop the retval and also the Error**.

Suggested-by: Avihai Horon <avihaih@nvidia.com>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Link: https://lore.kernel.org/r/20240222095301.171137-4-peterx@redhat.com
Signed-off-by: Peter Xu <peterx@redhat.com>
migration/multifd.c

index 1d039a48408e56d485e8d3e30170dffb58082e0b..af89e059159e1e5b3525fc1f52058c1057062f74 100644 (file)
@@ -943,9 +943,7 @@ static bool multifd_tls_channel_connect(MultiFDSendParams *p,
     return true;
 }
 
-static bool multifd_channel_connect(MultiFDSendParams *p,
-                                    QIOChannel *ioc,
-                                    Error **errp)
+static void multifd_channel_connect(MultiFDSendParams *p, QIOChannel *ioc)
 {
     qio_channel_set_delay(ioc, false);
 
@@ -956,7 +954,6 @@ static bool multifd_channel_connect(MultiFDSendParams *p,
     p->thread_created = true;
     qemu_thread_create(&p->thread, p->name, multifd_send_thread, p,
                        QEMU_THREAD_JOINABLE);
-    return true;
 }
 
 /*
@@ -988,7 +985,8 @@ static void multifd_new_send_channel_async(QIOTask *task, gpointer opaque)
             return;
         }
     } else {
-        ret = multifd_channel_connect(p, ioc, &local_err);
+        multifd_channel_connect(p, ioc);
+        ret = true;
     }
 
 out: