]> git.proxmox.com Git - mirror_qemu.git/commitdiff
aio-posix: remove useless parameter
authorCao jin <caoj.fnst@cn.fujitsu.com>
Fri, 15 Jul 2016 10:28:44 +0000 (18:28 +0800)
committerStefan Hajnoczi <stefanha@redhat.com>
Mon, 18 Jul 2016 14:10:52 +0000 (15:10 +0100)
Parameter **errp of aio_context_setup() is useless, remove it
and clean up the related code.

Cc: Stefan Hajnoczi <stefanha@redhat.com>
Cc: Fam Zheng <famz@redhat.com>
Cc: Eric Blake <eblake@redhat.com>
Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-id: 1468578524-23433-1-git-send-email-caoj.fnst@cn.fujitsu.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
aio-posix.c
aio-win32.c
async.c
include/block/aio.h

index 6006122e0b9a3841d901cb856bc45529364e5995..43162a9f29164697c28e2f7990f596deacefb61f 100644 (file)
@@ -485,12 +485,13 @@ bool aio_poll(AioContext *ctx, bool blocking)
     return progress;
 }
 
-void aio_context_setup(AioContext *ctx, Error **errp)
+void aio_context_setup(AioContext *ctx)
 {
 #ifdef CONFIG_EPOLL_CREATE1
     assert(!ctx->epollfd);
     ctx->epollfd = epoll_create1(EPOLL_CLOEXEC);
     if (ctx->epollfd == -1) {
+        fprintf(stderr, "Failed to create epoll instance: %s", strerror(errno));
         ctx->epoll_available = false;
     } else {
         ctx->epoll_available = true;
index 6aaa32a147c1ab8df3d7634db38f36b3b808ce81..c8c249e260f60694720a5e34899c333d49b3d01e 100644 (file)
@@ -371,6 +371,6 @@ bool aio_poll(AioContext *ctx, bool blocking)
     return progress;
 }
 
-void aio_context_setup(AioContext *ctx, Error **errp)
+void aio_context_setup(AioContext *ctx)
 {
 }
diff --git a/async.c b/async.c
index 0e0efc340af4e8c66da405f91641219e17ffc3f0..3bca9b0adb626324c4a09afe97effb8badfa6f6b 100644 (file)
--- a/async.c
+++ b/async.c
@@ -347,14 +347,10 @@ AioContext *aio_context_new(Error **errp)
 {
     int ret;
     AioContext *ctx;
-    Error *local_err = NULL;
 
     ctx = (AioContext *) g_source_new(&aio_source_funcs, sizeof(AioContext));
-    aio_context_setup(ctx, &local_err);
-    if (local_err) {
-        error_propagate(errp, local_err);
-        goto fail;
-    }
+    aio_context_setup(ctx);
+
     ret = event_notifier_init(&ctx->notifier, false);
     if (ret < 0) {
         error_setg_errno(errp, -ret, "Failed to initialize event notifier");
index afd72a75166e278a8966f8254ba50fd6b518ae2f..209551deb299ec5d5356f4a3a4428a6ee83db511 100644 (file)
@@ -452,6 +452,6 @@ static inline bool aio_node_check(AioContext *ctx, bool is_external)
  *
  * Initialize the aio context.
  */
-void aio_context_setup(AioContext *ctx, Error **errp);
+void aio_context_setup(AioContext *ctx);
 
 #endif