qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
To: qemu-devel@nongnu.org
Cc: "Alexey Kardashevskiy" <aik@ozlabs.ru>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"KONRAD Frederic" <frederic.konrad@adacore.com>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	"Peter Maydell" <peter.maydell@linaro.org>
Subject: [PATCH-for-6.1 v3 3/5] memory: Rename MemoryRegion object getters
Date: Sat, 27 Mar 2021 15:34:50 +0100	[thread overview]
Message-ID: <20210327143452.1514392-4-f4bug@amsat.org> (raw)
In-Reply-To: <20210327143452.1514392-1-f4bug@amsat.org>

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



  parent reply	other threads:[~2021-03-27 14:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-27 14:34 [PATCH v3 0/5] memory: Add 'priority' property setter Philippe Mathieu-Daudé
2021-03-27 14:34 ` [PATCH-for-6.0 v3 1/5] memory: Fix memory_region 'priority' property sign Philippe Mathieu-Daudé
2021-03-27 14:34 ` [PATCH-for-6.1 v3 2/5] memory: Add memory_region_set_priority() Philippe Mathieu-Daudé
2021-03-27 14:34 ` Philippe Mathieu-Daudé [this message]
2021-03-27 14:34 ` [PATCH-for-6.1 v3 4/5] memory: Add setter for MemoryRegion object 'size' property Philippe Mathieu-Daudé
2021-03-27 14:34 ` [PATCH-for-6.1 v3 5/5] memory: Add setter for MemoryRegion object 'priority' property Philippe Mathieu-Daudé
2021-03-27 16:58 ` [PATCH v3 0/5] memory: Add 'priority' property setter Peter Maydell
2021-03-27 18:44   ` Philippe Mathieu-Daudé
2021-03-27 19:43     ` Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210327143452.1514392-4-f4bug@amsat.org \
    --to=f4bug@amsat.org \
    --cc=aik@ozlabs.ru \
    --cc=frederic.konrad@adacore.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).