397dc2
From c049804bc3b296a183ce0bd819d5f9b1d1a45ea7 Mon Sep 17 00:00:00 2001
397dc2
Message-Id: <c049804bc3b296a183ce0bd819d5f9b1d1a45ea7@dist-git>
397dc2
From: Michal Privoznik <mprivozn@redhat.com>
397dc2
Date: Wed, 7 Oct 2020 18:45:34 +0200
397dc2
Subject: [PATCH] numa_conf: Drop CPU from name of two functions
397dc2
MIME-Version: 1.0
397dc2
Content-Type: text/plain; charset=UTF-8
397dc2
Content-Transfer-Encoding: 8bit
397dc2
397dc2
There are two functions virDomainNumaDefCPUFormatXML() and
397dc2
virDomainNumaDefCPUParseXML() which format and parse domain's
397dc2
<numa/>. There is nothing CPU specific about them. Drop the
397dc2
infix.
397dc2
397dc2
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
397dc2
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
397dc2
(cherry picked from commit 68c5b0183cb157c4672a6af3a14375df4434cee5)
397dc2
397dc2
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1749518
397dc2
397dc2
Conflicts:
397dc2
- src/conf/domain_conf.c: Context.
397dc2
397dc2
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
397dc2
Message-Id: <a06547d5b53c7a8fa2a2801a9cbd7a47834ebaa3.1602087923.git.mprivozn@redhat.com>
397dc2
Reviewed-by: Ján Tomko <jtomko@redhat.com>
397dc2
---
397dc2
 src/conf/cpu_conf.c    | 2 +-
397dc2
 src/conf/domain_conf.c | 2 +-
397dc2
 src/conf/numa_conf.c   | 8 ++++----
397dc2
 src/conf/numa_conf.h   | 4 ++--
397dc2
 4 files changed, 8 insertions(+), 8 deletions(-)
397dc2
397dc2
diff --git a/src/conf/cpu_conf.c b/src/conf/cpu_conf.c
397dc2
index 1a2948ce11..dfd0c1f798 100644
397dc2
--- a/src/conf/cpu_conf.c
397dc2
+++ b/src/conf/cpu_conf.c
397dc2
@@ -746,7 +746,7 @@ virCPUDefFormatBufFull(virBufferPtr buf,
397dc2
     if (virCPUDefFormatBuf(&childrenBuf, def) < 0)
397dc2
         goto cleanup;
397dc2
 
397dc2
-    if (virDomainNumaDefCPUFormatXML(&childrenBuf, numa) < 0)
397dc2
+    if (virDomainNumaDefFormatXML(&childrenBuf, numa) < 0)
397dc2
         goto cleanup;
397dc2
 
397dc2
     /* Put it all together */
397dc2
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
397dc2
index 484f3b4352..3229d5ec95 100644
397dc2
--- a/src/conf/domain_conf.c
397dc2
+++ b/src/conf/domain_conf.c
397dc2
@@ -20487,7 +20487,7 @@ virDomainDefParseXML(xmlDocPtr xml,
397dc2
     if (virCPUDefParseXML(ctxt, "./cpu[1]", VIR_CPU_TYPE_GUEST, &def->cpu) < 0)
397dc2
         goto error;
397dc2
 
397dc2
-    if (virDomainNumaDefCPUParseXML(def->numa, ctxt) < 0)
397dc2
+    if (virDomainNumaDefParseXML(def->numa, ctxt) < 0)
397dc2
         goto error;
397dc2
 
397dc2
     if (virDomainNumaGetCPUCountTotal(def->numa) > virDomainDefGetVcpusMax(def)) {
397dc2
diff --git a/src/conf/numa_conf.c b/src/conf/numa_conf.c
397dc2
index 6f1257fd8e..38fcf9d9aa 100644
397dc2
--- a/src/conf/numa_conf.c
397dc2
+++ b/src/conf/numa_conf.c
397dc2
@@ -842,8 +842,8 @@ virDomainNumaDefNodeDistanceParseXML(virDomainNumaPtr def,
397dc2
 }
397dc2
 
397dc2
 int
397dc2
-virDomainNumaDefCPUParseXML(virDomainNumaPtr def,
397dc2
-                            xmlXPathContextPtr ctxt)
397dc2
+virDomainNumaDefParseXML(virDomainNumaPtr def,
397dc2
+                         xmlXPathContextPtr ctxt)
397dc2
 {
397dc2
     xmlNodePtr *nodes = NULL;
397dc2
     xmlNodePtr oldNode = ctxt->node;
397dc2
@@ -971,8 +971,8 @@ virDomainNumaDefCPUParseXML(virDomainNumaPtr def,
397dc2
 
397dc2
 
397dc2
 int
397dc2
-virDomainNumaDefCPUFormatXML(virBufferPtr buf,
397dc2
-                             virDomainNumaPtr def)
397dc2
+virDomainNumaDefFormatXML(virBufferPtr buf,
397dc2
+                          virDomainNumaPtr def)
397dc2
 {
397dc2
     virDomainMemoryAccess memAccess;
397dc2
     virTristateBool discard;
397dc2
diff --git a/src/conf/numa_conf.h b/src/conf/numa_conf.h
397dc2
index b1b8e3274d..ce865cbfbb 100644
397dc2
--- a/src/conf/numa_conf.h
397dc2
+++ b/src/conf/numa_conf.h
397dc2
@@ -182,7 +182,7 @@ bool virDomainNumatuneNodesetIsAvailable(virDomainNumaPtr numatune,
397dc2
 bool virDomainNumatuneNodeSpecified(virDomainNumaPtr numatune,
397dc2
                                     int cellid);
397dc2
 
397dc2
-int virDomainNumaDefCPUParseXML(virDomainNumaPtr def, xmlXPathContextPtr ctxt);
397dc2
-int virDomainNumaDefCPUFormatXML(virBufferPtr buf, virDomainNumaPtr def);
397dc2
+int virDomainNumaDefParseXML(virDomainNumaPtr def, xmlXPathContextPtr ctxt);
397dc2
+int virDomainNumaDefFormatXML(virBufferPtr buf, virDomainNumaPtr def);
397dc2
 
397dc2
 unsigned int virDomainNumaGetCPUCountTotal(virDomainNumaPtr numa);
397dc2
-- 
397dc2
2.29.2
397dc2