From nobody Tue Apr 23 15:55:21 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) client-ip=205.139.110.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 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=1574686567; cv=none; d=zohomail.com; s=zohoarc; b=SiR2vM6j4wmnhn67mnaMKKPYtwpVJlEKu3J91Dk7tmfbajAQ8pGceykoDf5doJNHNkiX2weyu+d8BBmbl0jOXaGcxtupBOO6h1dsJlXcafSq+29TNXPX12KFyvroR7jsuaOpIsrj+GsmUMIvqilJfW3pVVs3tICjA2CwiajDKlA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1574686567; 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=l0vo0TtgUA1FUpuSF7/L1n3vf5DFOQHXT0m3Zlvh1v8=; b=leSvhAS0naihhX10xYU8n8xPbi2bTJXfy//q61ufGyaoyPF66xNSYrZPIJs3XameSAie2bDze93tz5NKTKIXZQiHhhn7FDP2MYu0IMYg2XwPP+5E6SYNZ3quNHOsa5+rfS4+JjRQhbnO485SsuX0r+1TXxED2J/Ds+d2tzx7EQ4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 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-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by mx.zohomail.com with SMTPS id 157468656773213.890733996140739; Mon, 25 Nov 2019 04:56:07 -0800 (PST) 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-178-wL9Ulh_JOH-cxFm7yZkH3Q-1; Mon, 25 Nov 2019 07:56:05 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4E1571060BB7; Mon, 25 Nov 2019 12:56:00 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 12DD05DA32; Mon, 25 Nov 2019 12:56:00 +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 A59644E566; Mon, 25 Nov 2019 12:55:59 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xAPCs3bG016672 for ; Mon, 25 Nov 2019 07:54:03 -0500 Received: by smtp.corp.redhat.com (Postfix) id 97271600CA; Mon, 25 Nov 2019 12:54:03 +0000 (UTC) Received: from angien.redhat.com (unknown [10.43.2.48]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1E2CE600C8 for ; Mon, 25 Nov 2019 12:54:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1574686566; 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=l0vo0TtgUA1FUpuSF7/L1n3vf5DFOQHXT0m3Zlvh1v8=; b=XWeKOpC5TiPtgEsLShbXLO6R40lIfhK6yBqGBFk4BJhYW2+ba94NkbAb24IxoBSVqvvgyp hsaE9nXOcbpQMkboy2OToxp5/ba1gXuuwS/McG3fhqkTEmhUTWnAlMdDO8UguqPE8p11AC uvW3g1xDSbz7fnWHjUDIdJGl6bAeeJo= From: Peter Krempa To: libvir-list@redhat.com Date: Mon, 25 Nov 2019 13:53:52 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 7/9] qemu: caps: Don't check capability before clearing it 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.14 X-MC-Unique: wL9Ulh_JOH-cxFm7yZkH3Q-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Checking whether a qemu capability set right before clearing it without any other logic doesn't make sense. Signed-off-by: Peter Krempa Reviewed-by: Cole Robinson --- src/qemu/qemu_capabilities.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index e5f19ddcaa..7c0533aef5 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -4602,8 +4602,7 @@ virQEMUCapsInitProcessCaps(virQEMUCapsPtr qemuCaps) /* Prealloc on NVDIMMs is broken on older QEMUs leading to * user data corruption. If we are dealing with such version * of QEMU pretend we don't know how to NVDIMM. */ - if (qemuCaps->version < 2009000 && - virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_NVDIMM)) + if (qemuCaps->version < 2009000) virQEMUCapsClear(qemuCaps, QEMU_CAPS_DEVICE_NVDIMM); if (ARCH_IS_X86(qemuCaps->arch) && --=20 2.23.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list