qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH-for-6.1 v3 3/5] memory: Rename MemoryRegion object getters


From: Philippe Mathieu-Daudé
Subject: [PATCH-for-6.1 v3 3/5] memory: Rename MemoryRegion object getters
Date: Sat, 27 Mar 2021 15:34:50 +0100

We want to add the corresponding object setters, but the
memory_region_set_size() / memory_region_set_priority()
functions already exist. Rename the getters so match with
the setters we are going to add in the next patches.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 softmmu/memory.c | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/softmmu/memory.c b/softmmu/memory.c
index fdba938f299..3f4cd4e85d7 100644
--- a/softmmu/memory.c
+++ b/softmmu/memory.c
@@ -1217,9 +1217,9 @@ static Object *memory_region_resolve_container(Object 
*obj, void *opaque,
     return OBJECT(mr->container);
 }
 
-static void memory_region_get_priority(Object *obj, Visitor *v,
-                                       const char *name, void *opaque,
-                                       Error **errp)
+static void memory_region_priority_getter(Object *obj, Visitor *v,
+                                          const char *name, void *opaque,
+                                          Error **errp)
 {
     MemoryRegion *mr = MEMORY_REGION(obj);
     int32_t value = mr->priority;
@@ -1227,8 +1227,9 @@ static void memory_region_get_priority(Object *obj, 
Visitor *v,
     visit_type_int32(v, name, &value, errp);
 }
 
-static void memory_region_get_size(Object *obj, Visitor *v, const char *name,
-                                   void *opaque, Error **errp)
+static void memory_region_size_getter(Object *obj, Visitor *v,
+                                      const char *name, void *opaque,
+                                      Error **errp)
 {
     MemoryRegion *mr = MEMORY_REGION(obj);
     uint64_t value = memory_region_size(mr);
@@ -1258,12 +1259,12 @@ static void memory_region_initfn(Object *obj)
     object_property_add_uint64_ptr(OBJECT(mr), "addr",
                                    &mr->addr, OBJ_PROP_FLAG_READ);
     object_property_add(OBJECT(mr), "priority", "int32",
-                        memory_region_get_priority,
-                        NULL, /* memory_region_set_priority */
+                        memory_region_priority_getter,
+                        NULL, /* memory_region_priority_setter */
                         NULL, NULL);
     object_property_add(OBJECT(mr), "size", "uint64",
-                        memory_region_get_size,
-                        NULL, /* memory_region_set_size, */
+                        memory_region_size_getter,
+                        NULL, /* memory_region_size_setter, */
                         NULL, NULL);
 }
 
-- 
2.26.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]