Blob Blame History Raw
From c049804bc3b296a183ce0bd819d5f9b1d1a45ea7 Mon Sep 17 00:00:00 2001
Message-Id: <c049804bc3b296a183ce0bd819d5f9b1d1a45ea7@dist-git>
From: Michal Privoznik <mprivozn@redhat.com>
Date: Wed, 7 Oct 2020 18:45:34 +0200
Subject: [PATCH] numa_conf: Drop CPU from name of two functions
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

There are two functions virDomainNumaDefCPUFormatXML() and
virDomainNumaDefCPUParseXML() which format and parse domain's
<numa/>. There is nothing CPU specific about them. Drop the
infix.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
(cherry picked from commit 68c5b0183cb157c4672a6af3a14375df4434cee5)

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1749518

Conflicts:
- src/conf/domain_conf.c: Context.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Message-Id: <a06547d5b53c7a8fa2a2801a9cbd7a47834ebaa3.1602087923.git.mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
---
 src/conf/cpu_conf.c    | 2 +-
 src/conf/domain_conf.c | 2 +-
 src/conf/numa_conf.c   | 8 ++++----
 src/conf/numa_conf.h   | 4 ++--
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/conf/cpu_conf.c b/src/conf/cpu_conf.c
index 1a2948ce11..dfd0c1f798 100644
--- a/src/conf/cpu_conf.c
+++ b/src/conf/cpu_conf.c
@@ -746,7 +746,7 @@ virCPUDefFormatBufFull(virBufferPtr buf,
     if (virCPUDefFormatBuf(&childrenBuf, def) < 0)
         goto cleanup;
 
-    if (virDomainNumaDefCPUFormatXML(&childrenBuf, numa) < 0)
+    if (virDomainNumaDefFormatXML(&childrenBuf, numa) < 0)
         goto cleanup;
 
     /* Put it all together */
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 484f3b4352..3229d5ec95 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -20487,7 +20487,7 @@ virDomainDefParseXML(xmlDocPtr xml,
     if (virCPUDefParseXML(ctxt, "./cpu[1]", VIR_CPU_TYPE_GUEST, &def->cpu) < 0)
         goto error;
 
-    if (virDomainNumaDefCPUParseXML(def->numa, ctxt) < 0)
+    if (virDomainNumaDefParseXML(def->numa, ctxt) < 0)
         goto error;
 
     if (virDomainNumaGetCPUCountTotal(def->numa) > virDomainDefGetVcpusMax(def)) {
diff --git a/src/conf/numa_conf.c b/src/conf/numa_conf.c
index 6f1257fd8e..38fcf9d9aa 100644
--- a/src/conf/numa_conf.c
+++ b/src/conf/numa_conf.c
@@ -842,8 +842,8 @@ virDomainNumaDefNodeDistanceParseXML(virDomainNumaPtr def,
 }
 
 int
-virDomainNumaDefCPUParseXML(virDomainNumaPtr def,
-                            xmlXPathContextPtr ctxt)
+virDomainNumaDefParseXML(virDomainNumaPtr def,
+                         xmlXPathContextPtr ctxt)
 {
     xmlNodePtr *nodes = NULL;
     xmlNodePtr oldNode = ctxt->node;
@@ -971,8 +971,8 @@ virDomainNumaDefCPUParseXML(virDomainNumaPtr def,
 
 
 int
-virDomainNumaDefCPUFormatXML(virBufferPtr buf,
-                             virDomainNumaPtr def)
+virDomainNumaDefFormatXML(virBufferPtr buf,
+                          virDomainNumaPtr def)
 {
     virDomainMemoryAccess memAccess;
     virTristateBool discard;
diff --git a/src/conf/numa_conf.h b/src/conf/numa_conf.h
index b1b8e3274d..ce865cbfbb 100644
--- a/src/conf/numa_conf.h
+++ b/src/conf/numa_conf.h
@@ -182,7 +182,7 @@ bool virDomainNumatuneNodesetIsAvailable(virDomainNumaPtr numatune,
 bool virDomainNumatuneNodeSpecified(virDomainNumaPtr numatune,
                                     int cellid);
 
-int virDomainNumaDefCPUParseXML(virDomainNumaPtr def, xmlXPathContextPtr ctxt);
-int virDomainNumaDefCPUFormatXML(virBufferPtr buf, virDomainNumaPtr def);
+int virDomainNumaDefParseXML(virDomainNumaPtr def, xmlXPathContextPtr ctxt);
+int virDomainNumaDefFormatXML(virBufferPtr buf, virDomainNumaPtr def);
 
 unsigned int virDomainNumaGetCPUCountTotal(virDomainNumaPtr numa);
-- 
2.29.2