[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 5/8] aio-posix: remove useless parameter
From: |
Stefan Hajnoczi |
Subject: |
[Qemu-devel] [PULL 5/8] aio-posix: remove useless parameter |
Date: |
Mon, 18 Jul 2016 17:59:18 +0100 |
From: Cao jin <address@hidden>
Parameter **errp of aio_context_setup() is useless, remove it
and clean up the related code.
Cc: Stefan Hajnoczi <address@hidden>
Cc: Fam Zheng <address@hidden>
Cc: Eric Blake <address@hidden>
Signed-off-by: Cao jin <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>
---
aio-posix.c | 3 ++-
aio-win32.c | 2 +-
async.c | 8 ++------
include/block/aio.h | 2 +-
4 files changed, 6 insertions(+), 9 deletions(-)
diff --git a/aio-posix.c b/aio-posix.c
index 6006122..43162a9 100644
--- a/aio-posix.c
+++ b/aio-posix.c
@@ -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;
diff --git a/aio-win32.c b/aio-win32.c
index 6aaa32a..c8c249e 100644
--- a/aio-win32.c
+++ b/aio-win32.c
@@ -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 0e0efc3..3bca9b0 100644
--- 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");
diff --git a/include/block/aio.h b/include/block/aio.h
index afd72a7..209551d 100644
--- a/include/block/aio.h
+++ b/include/block/aio.h
@@ -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
--
2.7.4
- [Qemu-devel] [PULL 0/8] Block patches, Stefan Hajnoczi, 2016/07/18
- [Qemu-devel] [PULL 1/8] spec/parallels: fix a mistake, Stefan Hajnoczi, 2016/07/18
- [Qemu-devel] [PULL 2/8] linux-aio: share one LinuxAioState within an AioContext, Stefan Hajnoczi, 2016/07/18
- [Qemu-devel] [PULL 3/8] aio_ctx_check: follow CODING_STYLE, Stefan Hajnoczi, 2016/07/18
- [Qemu-devel] [PULL 4/8] linux-aio: prevent submitting more than MAX_EVENTS, Stefan Hajnoczi, 2016/07/18
- [Qemu-devel] [PULL 5/8] aio-posix: remove useless parameter,
Stefan Hajnoczi <=
- [Qemu-devel] [PULL 7/8] virtio-blk: dataplane cleanup, Stefan Hajnoczi, 2016/07/18
- [Qemu-devel] [PULL 6/8] checkpatch: consider git extended headers valid patches, Stefan Hajnoczi, 2016/07/18
- [Qemu-devel] [PULL 8/8] MAINTAINERS: Add include/block/aio.h to block I/O path section, Stefan Hajnoczi, 2016/07/18
- Re: [Qemu-devel] [PULL 0/8] Block patches, Peter Maydell, 2016/07/19