vhost_user_server_set_aio_context() operates on a VuServer object. Make that the first argument of the function since it is conventional to define functions with the object they act on as the first argument. In other words, obj_action(obj, args...) is commonly used and not obj_action(arg1, ..., obj, ...).
Signed-off-by: Stefan Hajnoczi <stefa...@redhat.com> --- util/vhost-user-server.h | 2 +- util/vhost-user-server.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/util/vhost-user-server.h b/util/vhost-user-server.h index 5baf58f96a..584aab3da5 100644 --- a/util/vhost-user-server.h +++ b/util/vhost-user-server.h @@ -56,6 +56,6 @@ bool vhost_user_server_start(VuServer *server, void vhost_user_server_stop(VuServer *server); -void vhost_user_server_set_aio_context(AioContext *ctx, VuServer *server); +void vhost_user_server_set_aio_context(VuServer *server, AioContext *ctx); #endif /* VHOST_USER_SERVER_H */ diff --git a/util/vhost-user-server.c b/util/vhost-user-server.c index 49ada8bc78..5230ba3883 100644 --- a/util/vhost-user-server.c +++ b/util/vhost-user-server.c @@ -356,7 +356,7 @@ static void attach_context(VuServer *server, AioContext *ctx) } } -void vhost_user_server_set_aio_context(AioContext *ctx, VuServer *server) +void vhost_user_server_set_aio_context(VuServer *server, AioContext *ctx) { server->ctx = ctx ? ctx : qemu_get_aio_context(); if (!server->sioc) { -- 2.26.2