render / rpms / libvirt

Forked from rpms/libvirt 9 months ago
Clone
7a3408
From f48120d7df0abb0fba08e8f42e7f135981ab5011 Mon Sep 17 00:00:00 2001
7a3408
Message-Id: <f48120d7df0abb0fba08e8f42e7f135981ab5011@dist-git>
7a3408
From: Andrea Bolognani <abologna@redhat.com>
7a3408
Date: Tue, 11 Aug 2015 17:15:53 +0200
7a3408
Subject: [PATCH] cpu: Mark driver functions in ppc64 driver
7a3408
7a3408
Use the ppc64Driver prefix for all functions that are used to
7a3408
fill in the cpuDriverPPC64 structure, ie. those that are going
7a3408
to be called by the generic CPU code.
7a3408
7a3408
This makes it clear which functions are exported and which are
7a3408
implementation details; it also gets rid of the ambiguity that
7a3408
affected the ppc64DataFree() function which, despite what the
7a3408
name suggested, was not related to ppc64DataCopy() and could
7a3408
not be used to release the memory allocated for a
7a3408
virCPUppc64Data* instance.
7a3408
7a3408
No functional changes.
7a3408
7a3408
(cherry picked from commit 2686bf229247279da79505238b001cf45e0b6950)
7a3408
7a3408
Bug: https://bugzilla.redhat.com/show_bug.cgi?id=1250977
7a3408
7a3408
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
7a3408
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
7a3408
---
7a3408
 src/cpu/cpu_ppc64.c | 62 ++++++++++++++++++++++++++---------------------------
7a3408
 1 file changed, 31 insertions(+), 31 deletions(-)
7a3408
7a3408
diff --git a/src/cpu/cpu_ppc64.c b/src/cpu/cpu_ppc64.c
7a3408
index c3a51fb..5140297 100644
7a3408
--- a/src/cpu/cpu_ppc64.c
7a3408
+++ b/src/cpu/cpu_ppc64.c
7a3408
@@ -448,9 +448,9 @@ ppc64Compute(virCPUDefPtr host,
7a3408
 }
7a3408
 
7a3408
 static virCPUCompareResult
7a3408
-ppc64Compare(virCPUDefPtr host,
7a3408
-             virCPUDefPtr cpu,
7a3408
-             bool failIncompatible)
7a3408
+ppc64DriverCompare(virCPUDefPtr host,
7a3408
+                   virCPUDefPtr cpu,
7a3408
+                   bool failIncompatible)
7a3408
 {
7a3408
     if ((cpu->arch == VIR_ARCH_NONE || host->arch == cpu->arch) &&
7a3408
         STREQ(host->model, cpu->model))
7a3408
@@ -465,12 +465,12 @@ ppc64Compare(virCPUDefPtr host,
7a3408
 }
7a3408
 
7a3408
 static int
7a3408
-ppc64Decode(virCPUDefPtr cpu,
7a3408
-            const virCPUData *data,
7a3408
-            const char **models,
7a3408
-            unsigned int nmodels,
7a3408
-            const char *preferred ATTRIBUTE_UNUSED,
7a3408
-            unsigned int flags)
7a3408
+ppc64DriverDecode(virCPUDefPtr cpu,
7a3408
+                  const virCPUData *data,
7a3408
+                  const char **models,
7a3408
+                  unsigned int nmodels,
7a3408
+                  const char *preferred ATTRIBUTE_UNUSED,
7a3408
+                  unsigned int flags)
7a3408
 {
7a3408
     int ret = -1;
7a3408
     struct ppc64_map *map;
7a3408
@@ -510,7 +510,7 @@ ppc64Decode(virCPUDefPtr cpu,
7a3408
 
7a3408
 
7a3408
 static void
7a3408
-ppc64DataFree(virCPUDataPtr data)
7a3408
+ppc64DriverFree(virCPUDataPtr data)
7a3408
 {
7a3408
     if (data == NULL)
7a3408
         return;
7a3408
@@ -519,7 +519,7 @@ ppc64DataFree(virCPUDataPtr data)
7a3408
 }
7a3408
 
7a3408
 static virCPUDataPtr
7a3408
-ppc64NodeData(virArch arch)
7a3408
+ppc64DriverNodeData(virArch arch)
7a3408
 {
7a3408
     virCPUDataPtr cpuData;
7a3408
 
7a3408
@@ -537,17 +537,17 @@ ppc64NodeData(virArch arch)
7a3408
 }
7a3408
 
7a3408
 static virCPUCompareResult
7a3408
-ppc64GuestData(virCPUDefPtr host,
7a3408
-               virCPUDefPtr guest,
7a3408
-               virCPUDataPtr *data,
7a3408
-               char **message)
7a3408
+ppc64DriverGuestData(virCPUDefPtr host,
7a3408
+                     virCPUDefPtr guest,
7a3408
+                     virCPUDataPtr *data,
7a3408
+                     char **message)
7a3408
 {
7a3408
     return ppc64Compute(host, guest, data, message);
7a3408
 }
7a3408
 
7a3408
 static int
7a3408
-ppc64Update(virCPUDefPtr guest,
7a3408
-            const virCPUDef *host)
7a3408
+ppc64DriverUpdate(virCPUDefPtr guest,
7a3408
+                  const virCPUDef *host)
7a3408
 {
7a3408
     switch ((virCPUMode) guest->mode) {
7a3408
     case VIR_CPU_MODE_HOST_MODEL:
7a3408
@@ -569,11 +569,11 @@ ppc64Update(virCPUDefPtr guest,
7a3408
 }
7a3408
 
7a3408
 static virCPUDefPtr
7a3408
-ppc64Baseline(virCPUDefPtr *cpus,
7a3408
-              unsigned int ncpus,
7a3408
-              const char **models ATTRIBUTE_UNUSED,
7a3408
-              unsigned int nmodels ATTRIBUTE_UNUSED,
7a3408
-              unsigned int flags)
7a3408
+ppc64DriverBaseline(virCPUDefPtr *cpus,
7a3408
+                    unsigned int ncpus,
7a3408
+                    const char **models ATTRIBUTE_UNUSED,
7a3408
+                    unsigned int nmodels ATTRIBUTE_UNUSED,
7a3408
+                    unsigned int flags)
7a3408
 {
7a3408
     struct ppc64_map *map = NULL;
7a3408
     const struct ppc64_model *model;
7a3408
@@ -653,7 +653,7 @@ ppc64Baseline(virCPUDefPtr *cpus,
7a3408
 }
7a3408
 
7a3408
 static int
7a3408
-ppc64GetModels(char ***models)
7a3408
+ppc64DriverGetModels(char ***models)
7a3408
 {
7a3408
     struct ppc64_map *map;
7a3408
     struct ppc64_model *model;
7a3408
@@ -699,14 +699,14 @@ struct cpuArchDriver cpuDriverPPC64 = {
7a3408
     .name       = "ppc64",
7a3408
     .arch       = archs,
7a3408
     .narch      = ARRAY_CARDINALITY(archs),
7a3408
-    .compare    = ppc64Compare,
7a3408
-    .decode     = ppc64Decode,
7a3408
+    .compare    = ppc64DriverCompare,
7a3408
+    .decode     = ppc64DriverDecode,
7a3408
     .encode     = NULL,
7a3408
-    .free       = ppc64DataFree,
7a3408
-    .nodeData   = ppc64NodeData,
7a3408
-    .guestData  = ppc64GuestData,
7a3408
-    .baseline   = ppc64Baseline,
7a3408
-    .update     = ppc64Update,
7a3408
+    .free       = ppc64DriverFree,
7a3408
+    .nodeData   = ppc64DriverNodeData,
7a3408
+    .guestData  = ppc64DriverGuestData,
7a3408
+    .baseline   = ppc64DriverBaseline,
7a3408
+    .update     = ppc64DriverUpdate,
7a3408
     .hasFeature = NULL,
7a3408
-    .getModels  = ppc64GetModels,
7a3408
+    .getModels  = ppc64DriverGetModels,
7a3408
 };
7a3408
-- 
7a3408
2.5.0
7a3408