diff mbox series

[v1] libxl: update prototype of libxl__device_vkb_dm_needed

Message ID 20190410102634.1426-1-olaf@aepfle.de (mailing list archive)
State New, archived
Headers show
Series [v1] libxl: update prototype of libxl__device_vkb_dm_needed | expand

Commit Message

Olaf Hering April 10, 2019, 10:26 a.m. UTC
Align code to match other usage of device_dm_needed_fn_t:
recieve a void pointer, assign to expected type and use it accordingly.

No functional change expected.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
---
 tools/libxl/libxl_vkb.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

Comments

Wei Liu April 10, 2019, 10:32 a.m. UTC | #1
On Wed, Apr 10, 2019 at 12:26:34PM +0200, Olaf Hering wrote:
> Align code to match other usage of device_dm_needed_fn_t:
> recieve a void pointer, assign to expected type and use it accordingly.
> 
> No functional change expected.
> 
> Signed-off-by: Olaf Hering <olaf@aepfle.de>

Acked-by: Wei Liu <wei.liu2@citrix.com>
diff mbox series

Patch

diff --git a/tools/libxl/libxl_vkb.c b/tools/libxl/libxl_vkb.c
index e928839cfb..64e20b772a 100644
--- a/tools/libxl/libxl_vkb.c
+++ b/tools/libxl/libxl_vkb.c
@@ -26,9 +26,11 @@  static int libxl__device_vkb_setdefault(libxl__gc *gc, uint32_t domid,
     return libxl__resolve_domid(gc, vkb->backend_domname, &vkb->backend_domid);
 }
 
-static int libxl__device_vkb_dm_needed(libxl_device_vkb *vkb, uint32_t domid)
+static int libxl__device_vkb_dm_needed(void *e, uint32_t domid)
 {
-    return vkb->backend_type == LIBXL_VKB_BACKEND_QEMU;
+    libxl_device_vkb *elem = e;
+
+    return elem->backend_type == LIBXL_VKB_BACKEND_QEMU;
 }
 
 static int libxl__set_xenstore_vkb(libxl__gc *gc, uint32_t domid,
@@ -327,7 +329,7 @@  LIBXL_DEFINE_DEVICE_REMOVE(vkb)
 
 DEFINE_DEVICE_TYPE_STRUCT(vkb, VKBD,
     .skip_attach = 1,
-    .dm_needed = (device_dm_needed_fn_t)libxl__device_vkb_dm_needed,
+    .dm_needed = libxl__device_vkb_dm_needed,
     .set_xenstore_config = (device_set_xenstore_config_fn_t)
                            libxl__set_xenstore_vkb,
     .from_xenstore = (device_from_xenstore_fn_t)libxl__vkb_from_xenstore