From nobody Mon Feb 9 17:24:54 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 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=1594198189; cv=none; d=zohomail.com; s=zohoarc; b=NDj2C/nY0DpFm/6nTajs6/MvBNhUTzPcCoztpbjs50+UIr6puM5RepCQA2Aw7hnfhyAzIAdlqfbPoL62Yr04JlgqjJduJzCoWz77RXhPwipV+XAGtVKkEWLSpfpTcIHqNx5Bfq9bR6AJjuN+mpD+NH2Nri9NIbCOtefvRfDjetM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1594198189; h=Content-Type:Content-Transfer-Encoding:Cc: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=mQmJhut3MWFu988AJz0C0GEApMEJIZoeW1bPpUBZwd0=; b=Le0H8jT177j/9DYLEdxVOzhiLpluFHbwHIkLKCBdeFOmi2Qio4dxE2e74tnM3eQ+BxCWYyaeOsu4LJgNBJ93dO3F9OnR5LltYAvZ7MSNS4guvFzv2BZM58OicISD8TmDyzVwsXbjT3c5AgJIVDkVJgbFDWrBVkRH9XkBf1/14Zs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 1594198189399907.1155217533907; Wed, 8 Jul 2020 01:49:49 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-96--wr5_npAO7ScxpGSqWDQEw-1; Wed, 08 Jul 2020 04:49:45 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 896248015F3; Wed, 8 Jul 2020 08:49:40 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5B7D36106A; Wed, 8 Jul 2020 08:49:40 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id E3CAB1809547; Wed, 8 Jul 2020 08:49:38 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 0688nbQE016470 for ; Wed, 8 Jul 2020 04:49:37 -0400 Received: by smtp.corp.redhat.com (Postfix) id 965841A914; Wed, 8 Jul 2020 08:49:37 +0000 (UTC) Received: from nautilus.redhat.com (unknown [10.40.193.239]) by smtp.corp.redhat.com (Postfix) with ESMTP id DF02719D7E; Wed, 8 Jul 2020 08:49:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1594198188; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=mQmJhut3MWFu988AJz0C0GEApMEJIZoeW1bPpUBZwd0=; b=b3gNrFcGOLH+eKsoPvpaA12LqP0454G19OB5kh435VqNC1T854hS7s21NXWaT9uo82I8Xa HqViX9yu7KerPuf1YAVYfDceJQ5Ub/IsvHYKWGDHPkmGe75xrvIQ8wPKWCzZtcHtaXCq87 Ok2tvAdPwntReJ2OZWoByx0vfBvhIP0= X-MC-Unique: -wr5_npAO7ScxpGSqWDQEw-1 From: Erik Skultety To: libvir-list@redhat.com Subject: [libvirt PATCH v2 2/2] qemu: capabilities: Drop the virQEMUCapsCacheLookupByArch function Date: Wed, 8 Jul 2020 10:49:31 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Cc: Erik Skultety X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Previous commit removed the last usage of the function. Drop virQEMUCapsCompareArch as well since virQEMUCapsCacheLookupByArch was its only caller. Signed-off-by: Erik Skultety --- src/qemu/qemu_capabilities.c | 63 ------------------------------------ src/qemu/qemu_capabilities.h | 2 -- 2 files changed, 65 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index efc42aac17..25a0b36940 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -5668,69 +5668,6 @@ virQEMUCapsCacheLookupCopy(virFileCachePtr cache, } =20 =20 -static int -virQEMUCapsCompareArch(const void *payload, - const void *name G_GNUC_UNUSED, - const void *opaque) -{ - struct virQEMUCapsSearchData *data =3D (struct virQEMUCapsSearchData *= )opaque; - const virQEMUCaps *qemuCaps =3D payload; - - if (qemuCaps->arch !=3D data->arch) - return false; - - if (data->binaryFilter && - !strstr(qemuCaps->binary, data->binaryFilter)) { - return false; - } - - return true; -} - - -virQEMUCapsPtr -virQEMUCapsCacheLookupByArch(virFileCachePtr cache, - virArch arch) -{ - virQEMUCapsCachePrivPtr priv =3D virFileCacheGetPriv(cache); - virQEMUCapsPtr ret =3D NULL; - const char *binaryFilters[] =3D { - "qemu-system-", - NULL, - }; - virArch archs[] =3D { - arch, - virQEMUCapsFindTarget(virArchFromHost(), arch), - }; - size_t i; - size_t j; - - priv->microcodeVersion =3D virHostCPUGetMicrocodeVersion(); - - for (i =3D 0; i < G_N_ELEMENTS(binaryFilters); i++) { - for (j =3D 0; j < G_N_ELEMENTS(archs); j++) { - struct virQEMUCapsSearchData data =3D { - .arch =3D archs[j], - .binaryFilter =3D binaryFilters[i], - }; - - ret =3D virFileCacheLookupByFunc(cache, virQEMUCapsCompareArch= , &data); - if (ret) - goto done; - } - } - - virReportError(VIR_ERR_INVALID_ARG, - _("unable to find any emulator to serve '%s' " - "architecture"), virArchToString(arch)); - - done: - VIR_DEBUG("Returning caps %p for arch %s", ret, virArchToString(arch)); - - return ret; -} - - /** * virQEMUCapsCacheLookupDefault: * @cache: QEMU capabilities cache diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index 3e585d1229..9834fc2a52 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -703,8 +703,6 @@ virQEMUCapsPtr virQEMUCapsCacheLookupCopy(virFileCacheP= tr cache, virDomainVirtType virtType, const char *binary, const char *machineType); -virQEMUCapsPtr virQEMUCapsCacheLookupByArch(virFileCachePtr cache, - virArch arch); virQEMUCapsPtr virQEMUCapsCacheLookupDefault(virFileCachePtr cache, const char *binary, const char *archStr, --=20 2.26.2