diff mbox series

[3/6] vhost-user-server: adjust vhost_user_server_set_aio_context() arguments

Message ID 20200619120046.2422205-3-stefanha@redhat.com
State New
Headers show
Series None | expand

Commit Message

Stefan Hajnoczi June 19, 2020, noon UTC
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 <stefanha@redhat.com>
---
 util/vhost-user-server.h | 2 +-
 util/vhost-user-server.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

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) {