From nobody Sun Feb 8 04:18:04 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1674466509; cv=none; d=zohomail.com; s=zohoarc; b=YqJJJDvlH/vhe98dwLJcr4wKDQpMOmcGlK7lB3QI+c28FU4enCOSctNao/gF155+VVoOGpUcyOeipg2wZL+iqyFNm9oNI+TMkmJD9m7u0vgpWITyYcVuKifN0p7x16FhJvMms8o7nikbsN0NheSlpk47haOJni2d4OxNAlvzbOQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1674466509; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=yeFw1jRXbbZz1B5ytb0ehhHIfyYjKlFqEHVVfCLe08I=; b=MY0TTh6K8OzD2Hrn0MTbEZanLQLRyeTDSCt610CujAaRTaVh1g9peWi2EAZ2/ufpfGsrmHlcc4roJsrvfMDKspa4sJ2YufSTRO/C394tl65hbcqn/EkxH8a2F6ifPtZpeopq0gh08ZbY1VFVYxx+pxaMIuqO1NK3+bE8x5L8BZE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 16744665093958.424266920544937; Mon, 23 Jan 2023 01:35:09 -0800 (PST) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-68-JtmtNWk4OZCCc7lESkCpag-1; Mon, 23 Jan 2023 04:34:34 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id AA134802BEE; Mon, 23 Jan 2023 09:34:31 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 94ECB175A2; Mon, 23 Jan 2023 09:34:31 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 85301194658C; Mon, 23 Jan 2023 09:34:31 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id B830A1946589 for ; Mon, 23 Jan 2023 09:34:30 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 9C326111F3B0; Mon, 23 Jan 2023 09:34:30 +0000 (UTC) Received: from maggie.redhat.com (unknown [10.43.2.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id 420161121330 for ; Mon, 23 Jan 2023 09:34:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1674466508; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=yeFw1jRXbbZz1B5ytb0ehhHIfyYjKlFqEHVVfCLe08I=; b=H7ax+l1C7SV7Di39K2sU2EGpkmFfRBKyjbT0JbXMA8Xdhi/WQ1KpCRMLogsaKMwzGvKNXi Z33cx+SY8o+ZnvxkVChSPjfEZud6GqXMspSD4YUr4/MQqym1DJbHmz2B4cxARlirc42Hmj W0UV1aiaeOkoOuGb5S/GZA0Z7TwgASg= X-MC-Unique: JtmtNWk4OZCCc7lESkCpag-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH 08/15] vbox: Drop UIUSBCommon::GetEnabled() Date: Mon, 23 Jan 2023 10:34:17 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1674466511455100003 Content-Type: text/plain; charset="utf-8"; x-default="true" The UIUSBCommon::GetEnabled() function is not needed really, as it sets a boolean to true and always succeeds. We can live without the function. Signed-off-by: Michal Privoznik --- src/vbox/vbox_common.c | 6 ------ src/vbox/vbox_tmpl.c | 8 -------- src/vbox/vbox_uniformed_api.h | 1 - 3 files changed, 15 deletions(-) diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c index 70a9ffbc0d..abe8598940 100644 --- a/src/vbox/vbox_common.c +++ b/src/vbox/vbox_common.c @@ -2946,7 +2946,6 @@ static void vboxHostDeviceGetXMLDesc(struct _vboxDriver *data, virDomainDef *def, IMac= hine *machine) { IUSBCommon *USBCommon =3D NULL; - PRBool enabled =3D PR_FALSE; vboxArray deviceFilters =3D VBOX_ARRAY_INITIALIZER; size_t i; PRUint32 USBFilterCount =3D 0; @@ -2957,10 +2956,6 @@ vboxHostDeviceGetXMLDesc(struct _vboxDriver *data, v= irDomainDef *def, IMachine * if (!USBCommon) return; =20 - gVBoxAPI.UIUSBCommon.GetEnabled(USBCommon, &enabled); - if (!enabled) - goto release_controller; - gVBoxAPI.UArray.vboxArrayGet(&deviceFilters, USBCommon, gVBoxAPI.UArray.handleUSBGetDeviceFilters= (USBCommon)); =20 @@ -3035,7 +3030,6 @@ vboxHostDeviceGetXMLDesc(struct _vboxDriver *data, vi= rDomainDef *def, IMachine * =20 release_filters: gVBoxAPI.UArray.vboxArrayRelease(&deviceFilters); - release_controller: VBOX_RELEASE(USBCommon); return; =20 diff --git a/src/vbox/vbox_tmpl.c b/src/vbox/vbox_tmpl.c index e611412f7e..3dfdcd3fd6 100644 --- a/src/vbox/vbox_tmpl.c +++ b/src/vbox/vbox_tmpl.c @@ -1678,13 +1678,6 @@ _vrdeServerSetNetAddress(struct _vboxDriver *data, return rc; } =20 -static nsresult -_usbCommonGetEnabled(IUSBCommon *USBCommon G_GNUC_UNUSED, PRBool *enabled) -{ - *enabled =3D true; - return 0; -} - static nsresult _usbCommonCreateDeviceFilter(IUSBCommon *USBCommon, PRUnichar *name, IUSBDeviceFilter **filter) @@ -2406,7 +2399,6 @@ static vboxUniformedIVRDEServer _UIVRDEServer =3D { }; =20 static vboxUniformedIUSBCommon _UIUSBCommon =3D { - .GetEnabled =3D _usbCommonGetEnabled, .CreateDeviceFilter =3D _usbCommonCreateDeviceFilter, .InsertDeviceFilter =3D _usbCommonInsertDeviceFilter, }; diff --git a/src/vbox/vbox_uniformed_api.h b/src/vbox/vbox_uniformed_api.h index 23fb769c37..9c820b8d24 100644 --- a/src/vbox/vbox_uniformed_api.h +++ b/src/vbox/vbox_uniformed_api.h @@ -354,7 +354,6 @@ typedef struct { =20 /* Common Functions for IUSBController and IUSBDeviceFilters */ typedef struct { - nsresult (*GetEnabled)(IUSBCommon *USBCommon, PRBool *enabled); nsresult (*CreateDeviceFilter)(IUSBCommon *USBCommon, PRUnichar *name, IUSBDeviceFilter **filter); nsresult (*InsertDeviceFilter)(IUSBCommon *USBCommon, PRUint32 positio= n, --=20 2.39.1