From nobody Sun Feb 8 18:43:27 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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.129.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=1636043551; cv=none; d=zohomail.com; s=zohoarc; b=dZAun0aPWsfrDywGujot1XM5FXXSDqelgt8iahnvG/qkNcBNBQgC6u8i6g9UI/saC71Xn6pzsjLq6aJj80MQHxCqx9/AOFoelVDKDucBT53arJgGe628pXV6w1E0QUyI2tXbzwLnBaRFuEQuM7PFXnqYXj+jSdpyFU3riveOXIk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1636043551; 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=zk4ggB5PTql1yLq+rY9cuZkENa5+iJDWPRLUEVVmh4A=; b=MZ4rMlvmVj2UDY1D0Ux6Sv6CYbkUwMl4Fh0U7r8XMjZTY9nYga0f+2X9beqq6dzsl+vwi3q5q7wQDTgHgnnAd8W6wK8yBfnCrkwtvP64JhobahNdfdqAxN2XoutMsrUBCzdTsGxrP8kShBokJPZvlMJOKyFW1P/mOlDnJbRrjZ0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.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.129.124]) by mx.zohomail.com with SMTPS id 163604355108441.54940054587996; Thu, 4 Nov 2021 09:32:31 -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-251-mkDYbLdaMhO_ZcA2bC9ygg-1; Thu, 04 Nov 2021 12:32:28 -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 93EF8879515; Thu, 4 Nov 2021 16:32:22 +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 7292D60C0F; Thu, 4 Nov 2021 16:32:22 +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 340F31806D03; Thu, 4 Nov 2021 16:32:22 +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 1A4GRP1U026360 for ; Thu, 4 Nov 2021 12:27:25 -0400 Received: by smtp.corp.redhat.com (Postfix) id D08DF19723; Thu, 4 Nov 2021 16:27:25 +0000 (UTC) Received: from work.speedport.ip (unknown [10.39.193.164]) by smtp.corp.redhat.com (Postfix) with ESMTP id 25BBA19C79; Thu, 4 Nov 2021 16:27:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1636043550; 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=zk4ggB5PTql1yLq+rY9cuZkENa5+iJDWPRLUEVVmh4A=; b=B7za1W0PuBFRbe+O+MJtra6stw5rBVOiUWVxXpYhDK53YmiAUn2/BqLmBAjKaZojnL6eOy PYInZYW1gDhgrbQan+/Up/6IOJh3WOlunNh7xKpS1EtGtqq7FQrnnNLi7Y9vTRh3xzrqh1 X+t3M0M2fyx4T8h/B1NovIqPyu//ir4= X-MC-Unique: mkDYbLdaMhO_ZcA2bC9ygg-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH v2 04/20] cpu: Change virCPUArchDataParse to take xmlNodePtr Date: Thu, 4 Nov 2021 17:27:04 +0100 Message-Id: <20211104162720.108973-5-twiederh@redhat.com> In-Reply-To: <20211104162720.108973-1-twiederh@redhat.com> References: <20211104162720.108973-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Cc: Tim Wiederhake 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) X-ZM-MESSAGEID: 1636043553251100001 Content-Type: text/plain; charset="utf-8" The function does not need a full xmlXPathContextPtr any longer and a later patch will require a call to this function with only a xmlNodePtr available. Signed-off-by: Tim Wiederhake --- src/cpu/cpu.c | 2 +- src/cpu/cpu.h | 2 +- src/cpu/cpu_x86.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cpu/cpu.c b/src/cpu/cpu.c index b4965f3ee0..7823c7cd3d 100644 --- a/src/cpu/cpu.c +++ b/src/cpu/cpu.c @@ -832,7 +832,7 @@ virCPUDataParse(const char *xmlStr) return NULL; } =20 - data =3D driver->dataParse(ctxt); + data =3D driver->dataParse(ctxt->node); return data; } =20 diff --git a/src/cpu/cpu.h b/src/cpu/cpu.h index d11d2641fc..c4897a33f5 100644 --- a/src/cpu/cpu.h +++ b/src/cpu/cpu.h @@ -98,7 +98,7 @@ typedef char * (*virCPUArchDataFormat)(const virCPUData *data); =20 typedef virCPUData * -(*virCPUArchDataParse)(xmlXPathContextPtr ctxt); +(*virCPUArchDataParse)(xmlNodePtr node); =20 typedef int (*virCPUArchGetModels)(char ***models); diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c index 29b4df1f79..a08ac225ef 100644 --- a/src/cpu/cpu_x86.c +++ b/src/cpu/cpu_x86.c @@ -1782,14 +1782,14 @@ virCPUx86DataFormat(const virCPUData *data) =20 =20 static virCPUData * -virCPUx86DataParse(xmlXPathContextPtr ctxt) +virCPUx86DataParse(xmlNodePtr node) { g_autoptr(virCPUData) cpuData =3D NULL; =20 if (!(cpuData =3D virCPUDataNew(VIR_ARCH_X86_64))) return NULL; =20 - if (x86ParseDataItemList(&cpuData->data.x86, ctxt->node) < 0) + if (x86ParseDataItemList(&cpuData->data.x86, node) < 0) return NULL; =20 return g_steal_pointer(&cpuData); --=20 2.31.1