From nobody Wed Jan 15 12:07:27 2025 Delivered-To: importer@patchew.org Received-SPF: none (zohomail.com: 8.43.85.245 is neither permitted nor denied by domain of lists.libvirt.org) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; spf=none (zohomail.com: 8.43.85.245 is neither permitted nor denied by domain of lists.libvirt.org) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=fail(p=quarantine dis=quarantine) header.from=swemel.ru Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1704898335417790.9621703735811; Wed, 10 Jan 2024 06:52:15 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 996) id 5C0121C60; Wed, 10 Jan 2024 09:52:14 -0500 (EST) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id A9BAB1CD4; Wed, 10 Jan 2024 09:25:18 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 996) id 5ACCC1C96; Wed, 10 Jan 2024 09:24:41 -0500 (EST) Received: from mx.swemel.ru (mx.swemel.ru [95.143.211.150]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id E19701C44 for ; Wed, 10 Jan 2024 09:21:59 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.4 From: Dmitry Frolov To: devel@lists.libvirt.org Subject: [PATCH v4 19/19] libxl: change type to void libxlMakeDomainCapabilities() Date: Wed, 10 Jan 2024 17:21:34 +0300 Message-Id: <20240110142134.915450-20-frolov@swemel.ru> In-Reply-To: <20240110142134.915450-1-frolov@swemel.ru> References: <47d3cbc0-003b-4829-8038-8e00bbdb5c85@redhat.com> <20240110142134.915450-1-frolov@swemel.ru> MIME-Version: 1.0 Message-ID-Hash: ATN26RKZM4S32XRUK22PPOPCKAU3DPFT X-Message-ID-Hash: ATN26RKZM4S32XRUK22PPOPCKAU3DPFT X-MailFrom: frolov@swemel.ru X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header CC: sdl.libvirt@linuxtesting.org, Dmitry Frolov X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1704898336945100001 libxlMakeDomainCapabilities() returns nothing except 0. Changing return type to void. Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Dmitry Frolov --- src/libxl/libxl_capabilities.c | 4 +--- src/libxl/libxl_capabilities.h | 2 +- src/libxl/libxl_driver.c | 5 ++--- tests/domaincapstest.c | 3 +-- 4 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/libxl/libxl_capabilities.c b/src/libxl/libxl_capabilities.c index 159d923fc3..e6ed9ef29f 100644 --- a/src/libxl/libxl_capabilities.c +++ b/src/libxl/libxl_capabilities.c @@ -652,7 +652,7 @@ libxlMakeCapabilities(libxl_ctx *ctx) #define HVM_MAX_VCPUS 128 #define PV_MAX_VCPUS 512 =20 -int +void libxlMakeDomainCapabilities(virDomainCaps *domCaps, virFirmware **firmwares, size_t nfirmwares) @@ -680,8 +680,6 @@ libxlMakeDomainCapabilities(virDomainCaps *domCaps, domCaps->features[VIR_DOMAIN_CAPS_FEATURE_VMCOREINFO] =3D VIR_TRISTATE= _BOOL_NO; domCaps->features[VIR_DOMAIN_CAPS_FEATURE_GENID] =3D VIR_TRISTATE_BOOL= _NO; domCaps->gic.supported =3D VIR_TRISTATE_BOOL_NO; - - return 0; } =20 #define LIBXL_QEMU_DM_STR "Options specific to the Xen version:" diff --git a/src/libxl/libxl_capabilities.h b/src/libxl/libxl_capabilities.h index fd6332b63e..16ac3ed034 100644 --- a/src/libxl/libxl_capabilities.h +++ b/src/libxl/libxl_capabilities.h @@ -40,7 +40,7 @@ virCaps * libxlMakeCapabilities(libxl_ctx *ctx); =20 -int +void libxlMakeDomainCapabilities(virDomainCaps *domCaps, virFirmware **firmwares, size_t nfirmwares); diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c index 68aecaef8c..658d7d4005 100644 --- a/src/libxl/libxl_driver.c +++ b/src/libxl/libxl_driver.c @@ -6416,9 +6416,8 @@ libxlConnectGetDomainCapabilities(virConnectPtr conn, if (!(domCaps =3D virDomainCapsNew(emulatorbin, machine, arch, virttyp= e))) goto cleanup; =20 - if (libxlMakeDomainCapabilities(domCaps, cfg->firmwares, - cfg->nfirmwares) < 0) - goto cleanup; + libxlMakeDomainCapabilities(domCaps, cfg->firmwares, + cfg->nfirmwares); =20 ret =3D virDomainCapsFormat(domCaps); =20 diff --git a/tests/domaincapstest.c b/tests/domaincapstest.c index 97b306f652..ceeaf08b9f 100644 --- a/tests/domaincapstest.c +++ b/tests/domaincapstest.c @@ -143,8 +143,7 @@ fillXenCaps(virDomainCaps *domCaps) firmwares[0]->name =3D g_strdup("/usr/lib/xen/boot/hvmloader"); firmwares[1]->name =3D g_strdup("/usr/lib/xen/boot/ovmf.bin"); =20 - if (libxlMakeDomainCapabilities(domCaps, firmwares, 2) < 0) - return -1; + libxlMakeDomainCapabilities(domCaps, firmwares, 2); =20 return 0; } --=20 2.34.1 _______________________________________________ Devel mailing list -- devel@lists.libvirt.org To unsubscribe send an email to devel-leave@lists.libvirt.org