From patchwork Wed Apr 10 10:26:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olaf Hering X-Patchwork-Id: 10893573 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 288F11515 for ; Wed, 10 Apr 2019 10:28:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 13C48284A3 for ; Wed, 10 Apr 2019 10:28:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 07E91289B8; Wed, 10 Apr 2019 10:28:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id F2A7C284A3 for ; Wed, 10 Apr 2019 10:28:50 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hEARM-0000Vb-RK; Wed, 10 Apr 2019 10:26:48 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hEARL-0000VS-NV for xen-devel@lists.xenproject.org; Wed, 10 Apr 2019 10:26:48 +0000 X-Inumbo-ID: 23124b73-5b7b-11e9-92d7-bc764e045a96 Received: from mo6-p00-ob.smtp.rzone.de (unknown [2a01:238:20a:202:5300::7]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id 23124b73-5b7b-11e9-92d7-bc764e045a96; Wed, 10 Apr 2019 10:26:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1554892003; s=strato-dkim-0002; d=aepfle.de; h=Message-Id:Date:Subject:Cc:To:From:X-RZG-CLASS-ID:X-RZG-AUTH:From: Subject:Sender; bh=A3n2pyJoH5CQeUZDDG0uJ/G+gs5rW6MtRwhd69XH60A=; b=JoE9ttUTS7oEjmHrxpMx48EelzEHMrgQwAEY4aVUlHrUGqmc9RkzNUz6tMvHF6Zp+4 sSv/nkC1w78Y5fvptOpzJmcAHzSQmYhDGlxtwaCsVbsDT3+OqCzNx0WydJcZg41DLhlM SblGE2ls1MlEiobjGG+R8kBQ8eTg0so1zRDO57hpaIHNFhVjMXCj9+3V6+gCEs97oXAo v/Yo7r0i2RgwF1vecAgf+PlkuIiph77mfsen7KiZePEdttQpnASbdjlBvj1KO6rlHCmr D80eF/+Pi9xrZ8gZQb4rhgZtkPYHRJNFRQgxz2NiTkR/aYyhuSj+S5uLJfJ0in0/yuHq LUPQ== X-RZG-AUTH: ":P2EQZWCpfu+qG7CngxMFH1J+3q8wa/QXkBR9MXjAuznKRsvz7yq3NXHy7eI5Iw==" X-RZG-CLASS-ID: mo00 Received: from sender by smtp.strato.de (RZmta 44.18 DYNA|AUTH) with ESMTPSA id 60a847v3AAQa4uQ (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (curve secp521r1 with 521 ECDH bits, eq. 15360 bits RSA)) (Client did not present a certificate); Wed, 10 Apr 2019 12:26:36 +0200 (CEST) From: Olaf Hering To: xen-devel@lists.xenproject.org Date: Wed, 10 Apr 2019 12:26:34 +0200 Message-Id: <20190410102634.1426-1-olaf@aepfle.de> X-Mailer: git-send-email 2.16.4 MIME-Version: 1.0 Subject: [Xen-devel] [PATCH v1] libxl: update prototype of libxl__device_vkb_dm_needed X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Wei Liu , Olaf Hering , Ian Jackson Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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 Acked-by: Wei Liu --- tools/libxl/libxl_vkb.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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