Pablo Greco 40546a
From 99431463aaf37298bc90f82bc6b20b44f4853246 Mon Sep 17 00:00:00 2001
Pablo Greco 40546a
Message-Id: <99431463aaf37298bc90f82bc6b20b44f4853246@dist-git>
Pablo Greco 40546a
From: Jiri Denemark <jdenemar@redhat.com>
Pablo Greco 40546a
Date: Fri, 21 Jun 2019 09:25:26 +0200
Pablo Greco 40546a
Subject: [PATCH] cpu_x86: Rename x86DataCpuid
Pablo Greco 40546a
MIME-Version: 1.0
Pablo Greco 40546a
Content-Type: text/plain; charset=UTF-8
Pablo Greco 40546a
Content-Transfer-Encoding: 8bit
Pablo Greco 40546a
Pablo Greco 40546a
It is now called virCPUx86DataGet.
Pablo Greco 40546a
Pablo Greco 40546a
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Pablo Greco 40546a
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Pablo Greco 40546a
(cherry picked from commit 609f467f1377da3418dad23fdd9f7136e462ba5b)
Pablo Greco 40546a
Pablo Greco 40546a
https://bugzilla.redhat.com/show_bug.cgi?id=1697627
Pablo Greco 40546a
Pablo Greco 40546a
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Pablo Greco 40546a
Message-Id: <427e52b2993356d0170e2f756526e9d523686a42.1561068591.git.jdenemar@redhat.com>
Pablo Greco 40546a
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Pablo Greco 40546a
---
Pablo Greco 40546a
 src/cpu/cpu_x86.c | 26 +++++++++++++-------------
Pablo Greco 40546a
 1 file changed, 13 insertions(+), 13 deletions(-)
Pablo Greco 40546a
Pablo Greco 40546a
diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c
Pablo Greco 40546a
index d9475e5b4a..52709f109e 100644
Pablo Greco 40546a
--- a/src/cpu/cpu_x86.c
Pablo Greco 40546a
+++ b/src/cpu/cpu_x86.c
Pablo Greco 40546a
@@ -326,8 +326,8 @@ virCPUx86DataNext(virCPUx86DataIteratorPtr iterator)
Pablo Greco 40546a
 
Pablo Greco 40546a
 
Pablo Greco 40546a
 static virCPUx86DataItemPtr
Pablo Greco 40546a
-x86DataCpuid(const virCPUx86Data *data,
Pablo Greco 40546a
-             const virCPUx86DataItem *item)
Pablo Greco 40546a
+virCPUx86DataGet(const virCPUx86Data *data,
Pablo Greco 40546a
+                 const virCPUx86DataItem *item)
Pablo Greco 40546a
 {
Pablo Greco 40546a
     size_t i;
Pablo Greco 40546a
 
Pablo Greco 40546a
@@ -383,7 +383,7 @@ virCPUx86DataAddCPUIDInt(virCPUx86Data *data,
Pablo Greco 40546a
 {
Pablo Greco 40546a
     virCPUx86DataItemPtr existing;
Pablo Greco 40546a
 
Pablo Greco 40546a
-    if ((existing = x86DataCpuid(data, item))) {
Pablo Greco 40546a
+    if ((existing = virCPUx86DataGet(data, item))) {
Pablo Greco 40546a
         x86cpuidSetBits(&existing->cpuid, &item->cpuid);
Pablo Greco 40546a
     } else {
Pablo Greco 40546a
         if (VIR_APPEND_ELEMENT_COPY(data->items, data->len,
Pablo Greco 40546a
@@ -407,7 +407,7 @@ x86DataAdd(virCPUx86Data *data1,
Pablo Greco 40546a
     virCPUx86DataItemPtr item2;
Pablo Greco 40546a
 
Pablo Greco 40546a
     while ((item2 = virCPUx86DataNext(&iter))) {
Pablo Greco 40546a
-        item1 = x86DataCpuid(data1, item2);
Pablo Greco 40546a
+        item1 = virCPUx86DataGet(data1, item2);
Pablo Greco 40546a
 
Pablo Greco 40546a
         if (item1) {
Pablo Greco 40546a
             x86cpuidSetBits(&item1->cpuid, &item2->cpuid);
Pablo Greco 40546a
@@ -430,7 +430,7 @@ x86DataSubtract(virCPUx86Data *data1,
Pablo Greco 40546a
     virCPUx86DataItemPtr item2;
Pablo Greco 40546a
 
Pablo Greco 40546a
     while ((item1 = virCPUx86DataNext(&iter))) {
Pablo Greco 40546a
-        if ((item2 = x86DataCpuid(data2, item1)))
Pablo Greco 40546a
+        if ((item2 = virCPUx86DataGet(data2, item1)))
Pablo Greco 40546a
             x86cpuidClearBits(&item1->cpuid, &item2->cpuid);
Pablo Greco 40546a
     }
Pablo Greco 40546a
 }
Pablo Greco 40546a
@@ -445,7 +445,7 @@ x86DataIntersect(virCPUx86Data *data1,
Pablo Greco 40546a
     virCPUx86DataItemPtr item2;
Pablo Greco 40546a
 
Pablo Greco 40546a
     while ((item1 = virCPUx86DataNext(&iter))) {
Pablo Greco 40546a
-        item2 = x86DataCpuid(data2, item1);
Pablo Greco 40546a
+        item2 = virCPUx86DataGet(data2, item1);
Pablo Greco 40546a
         if (item2)
Pablo Greco 40546a
             x86cpuidAndBits(&item1->cpuid, &item2->cpuid);
Pablo Greco 40546a
         else
Pablo Greco 40546a
@@ -473,7 +473,7 @@ x86DataIsSubset(const virCPUx86Data *data,
Pablo Greco 40546a
     const virCPUx86DataItem *itemSubset;
Pablo Greco 40546a
 
Pablo Greco 40546a
     while ((itemSubset = virCPUx86DataNext(&iter))) {
Pablo Greco 40546a
-        if (!(item = x86DataCpuid(data, itemSubset)) ||
Pablo Greco 40546a
+        if (!(item = virCPUx86DataGet(data, itemSubset)) ||
Pablo Greco 40546a
             !x86cpuidMatchMasked(&item->cpuid, &itemSubset->cpuid))
Pablo Greco 40546a
             return false;
Pablo Greco 40546a
     }
Pablo Greco 40546a
@@ -514,7 +514,7 @@ x86DataToVendor(const virCPUx86Data *data,
Pablo Greco 40546a
 
Pablo Greco 40546a
     for (i = 0; i < map->nvendors; i++) {
Pablo Greco 40546a
         virCPUx86VendorPtr vendor = map->vendors[i];
Pablo Greco 40546a
-        if ((item = x86DataCpuid(data, &vendor->data)) &&
Pablo Greco 40546a
+        if ((item = virCPUx86DataGet(data, &vendor->data)) &&
Pablo Greco 40546a
             x86cpuidMatchMasked(&item->cpuid, &vendor->data.cpuid)) {
Pablo Greco 40546a
             x86cpuidClearBits(&item->cpuid, &vendor->data.cpuid);
Pablo Greco 40546a
             return vendor;
Pablo Greco 40546a
@@ -609,7 +609,7 @@ x86DataToSignatureFull(const virCPUx86Data *data,
Pablo Greco 40546a
 
Pablo Greco 40546a
     *family = *model = *stepping = 0;
Pablo Greco 40546a
 
Pablo Greco 40546a
-    if (!(item = x86DataCpuid(data, &leaf1)))
Pablo Greco 40546a
+    if (!(item = virCPUx86DataGet(data, &leaf1)))
Pablo Greco 40546a
         return;
Pablo Greco 40546a
 
Pablo Greco 40546a
     cpuid = &item->cpuid;
Pablo Greco 40546a
@@ -628,7 +628,7 @@ x86DataToSignature(const virCPUx86Data *data)
Pablo Greco 40546a
     virCPUx86DataItem leaf1 = CPUID(.eax_in = 0x1);
Pablo Greco 40546a
     virCPUx86DataItemPtr item;
Pablo Greco 40546a
 
Pablo Greco 40546a
-    if (!(item = x86DataCpuid(data, &leaf1)))
Pablo Greco 40546a
+    if (!(item = virCPUx86DataGet(data, &leaf1)))
Pablo Greco 40546a
         return 0;
Pablo Greco 40546a
 
Pablo Greco 40546a
     return item->cpuid.eax & SIGNATURE_MASK;
Pablo Greco 40546a
@@ -1154,7 +1154,7 @@ x86ModelCompare(virCPUx86ModelPtr model1,
Pablo Greco 40546a
     while ((item1 = virCPUx86DataNext(&iter1))) {
Pablo Greco 40546a
         virCPUx86CompareResult match = SUPERSET;
Pablo Greco 40546a
 
Pablo Greco 40546a
-        if ((item2 = x86DataCpuid(&model2->data, item1))) {
Pablo Greco 40546a
+        if ((item2 = virCPUx86DataGet(&model2->data, item1))) {
Pablo Greco 40546a
             if (x86cpuidMatch(&item1->cpuid, &item2->cpuid))
Pablo Greco 40546a
                 continue;
Pablo Greco 40546a
             else if (!x86cpuidMatchMasked(&item1->cpuid, &item2->cpuid))
Pablo Greco 40546a
@@ -1170,7 +1170,7 @@ x86ModelCompare(virCPUx86ModelPtr model1,
Pablo Greco 40546a
     while ((item2 = virCPUx86DataNext(&iter2))) {
Pablo Greco 40546a
         virCPUx86CompareResult match = SUBSET;
Pablo Greco 40546a
 
Pablo Greco 40546a
-        if ((item1 = x86DataCpuid(&model1->data, item2))) {
Pablo Greco 40546a
+        if ((item1 = virCPUx86DataGet(&model1->data, item2))) {
Pablo Greco 40546a
             if (x86cpuidMatch(&item2->cpuid, &item1->cpuid))
Pablo Greco 40546a
                 continue;
Pablo Greco 40546a
             else if (!x86cpuidMatchMasked(&item2->cpuid, &item1->cpuid))
Pablo Greco 40546a
@@ -2384,7 +2384,7 @@ cpuidSetLeaf12(virCPUDataPtr data,
Pablo Greco 40546a
     virCPUx86CPUIDPtr cpuid = &item.cpuid;
Pablo Greco 40546a
     virCPUx86DataItemPtr leaf7;
Pablo Greco 40546a
 
Pablo Greco 40546a
-    if (!(leaf7 = x86DataCpuid(&data->data.x86, &item)) ||
Pablo Greco 40546a
+    if (!(leaf7 = virCPUx86DataGet(&data->data.x86, &item)) ||
Pablo Greco 40546a
         !(leaf7->cpuid.ebx & (1 << 2)))
Pablo Greco 40546a
         return 0;
Pablo Greco 40546a
 
Pablo Greco 40546a
-- 
Pablo Greco 40546a
2.22.0
Pablo Greco 40546a