From nobody Tue Feb 10 12:14:13 2026 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=none dis=none) header.from=red-soft.ru Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1704328095255665.5854340346312; Wed, 3 Jan 2024 16:28:15 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 996) id 29E981768; Wed, 3 Jan 2024 19:28:14 -0500 (EST) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id DB750180C; Wed, 3 Jan 2024 19:17:57 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 996) id B8B4093; Wed, 3 Jan 2024 19:17:14 -0500 (EST) Received: from gw.red-soft.ru (red-soft.ru [188.246.186.2]) by lists.libvirt.org (Postfix) with ESMTP id B9BCE93 for ; Wed, 3 Jan 2024 19:17:10 -0500 (EST) Received: from gentoo.darknet (unknown [10.81.10.45]) by gw.red-soft.ru (Postfix) with ESMTPA id 112FB3E1C0F; Thu, 4 Jan 2024 03:17:10 +0300 (MSK) 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: Artem Chernyshev To: devel@lists.libvirt.org Subject: [PATCH 6/7] node_device: udevTranslatePCIIds() to void Date: Thu, 4 Jan 2024 03:17:02 +0300 Message-ID: <20240104001703.8067-7-artem.chernyshev@red-soft.ru> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240104001703.8067-1-artem.chernyshev@red-soft.ru> References: <20240104001703.8067-1-artem.chernyshev@red-soft.ru> MIME-Version: 1.0 X-KLMS-Rule-ID: 1 X-KLMS-Message-Action: clean X-KLMS-AntiSpam-Lua-Profiles: 182461 [Jan 03 2024] X-KLMS-AntiSpam-Version: 6.1.0.3 X-KLMS-AntiSpam-Envelope-From: artem.chernyshev@red-soft.ru X-KLMS-AntiSpam-Rate: 0 X-KLMS-AntiSpam-Status: not_detected X-KLMS-AntiSpam-Method: none X-KLMS-AntiSpam-Auth: dkim=none X-KLMS-AntiSpam-Info: LuaCore: 7 0.3.7 6d6bf5bd8eea7373134f756a2fd73e9456bb7d1a, {Tracking_from_domain_doesnt_match_to}, 127.0.0.199:7.1.2;d41d8cd98f00b204e9800998ecf8427e.com:7.1.1;red-soft.ru:7.1.1, FromAlignment: s X-MS-Exchange-Organization-SCL: -1 X-KLMS-AntiSpam-Interceptor-Info: scan successful X-KLMS-AntiPhishing: Clean, bases: 2024/01/03 22:32:00 X-KLMS-AntiVirus: Kaspersky Security for Linux Mail Server, version 8.0.3.30, bases: 2024/01/03 23:19:00 #22957326 X-KLMS-AntiVirus-Status: Clean, skipped Message-ID-Hash: VCNGJDWLAS5XTKXXPKCG4OFKDV4PVW4Z X-Message-ID-Hash: VCNGJDWLAS5XTKXXPKCG4OFKDV4PVW4Z X-MailFrom: artem.chernyshev@red-soft.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: Artem Chernyshev 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: 1704328097018100001 udevTranslatePCIIds() return value is invariant, so change it type and remove all dependent checks. Fixes: 7f1f0453fc ("node_device: use g_strdup instead of VIR_STRDUP") Signed-off-by: Artem Chernyshev --- src/node_device/node_device_udev.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_devi= ce_udev.c index 911325600e..8d38aec070 100644 --- a/src/node_device/node_device_udev.c +++ b/src/node_device/node_device_udev.c @@ -332,7 +332,7 @@ udevGenerateDeviceName(struct udev_device *device, =20 static virMutex pciaccessMutex =3D VIR_MUTEX_INITIALIZER; =20 -static int +static void udevTranslatePCIIds(unsigned int vendor, unsigned int product, char **vendor_string, @@ -356,8 +356,6 @@ udevTranslatePCIIds(unsigned int vendor, =20 *vendor_string =3D g_strdup(vendor_name); *product_string =3D g_strdup(device_name); - - return 0; } =20 =20 @@ -398,12 +396,10 @@ udevProcessPCI(struct udev_device *device, if (udevGetUintSysfsAttr(device, "device", &pci_dev->product, 16) < 0) goto cleanup; =20 - if (udevTranslatePCIIds(pci_dev->vendor, - pci_dev->product, - &pci_dev->vendor_name, - &pci_dev->product_name) !=3D 0) { - goto cleanup; - } + udevTranslatePCIIds(pci_dev->vendor, + pci_dev->product, + &pci_dev->vendor_name, + &pci_dev->product_name); =20 udevGenerateDeviceName(device, def, NULL); =20 --=20 2.43.0 _______________________________________________ Devel mailing list -- devel@lists.libvirt.org To unsubscribe send an email to devel-leave@lists.libvirt.org