diff mbox series

[1/3] memory: Better name 'offset' argument in mtree_print_mr()

Message ID 20210305235414.2358144-2-f4bug@amsat.org (mailing list archive)
State New, archived
Headers show
Series memory: Display AddressSpace zero-based in 'info mtree' | expand

Commit Message

Philippe Mathieu-Daudé March 5, 2021, 11:54 p.m. UTC
The 'base' argument of mtree_print_mr() actually represents
an offset, not a base address. Rename it as such.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 softmmu/memory.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/softmmu/memory.c b/softmmu/memory.c
index 874a8fccdee..e4d93b2fd6f 100644
--- a/softmmu/memory.c
+++ b/softmmu/memory.c
@@ -2925,7 +2925,7 @@  static void mtree_print_mr_owner(const MemoryRegion *mr)
 }
 
 static void mtree_print_mr(const MemoryRegion *mr, unsigned int level,
-                           hwaddr base,
+                           hwaddr offset,
                            MemoryRegionListHead *alias_print_queue,
                            bool owner, bool display_disabled)
 {
@@ -2939,7 +2939,7 @@  static void mtree_print_mr(const MemoryRegion *mr, unsigned int level,
         return;
     }
 
-    cur_start = base + mr->addr;
+    cur_start = offset + mr->addr;
     cur_end = cur_start + MR_SIZE(mr->size);
 
     /*
@@ -2947,7 +2947,7 @@  static void mtree_print_mr(const MemoryRegion *mr, unsigned int level,
      * happen normally. When it happens, we dump something to warn the
      * user who is observing this.
      */
-    if (cur_start < base || cur_end < cur_start) {
+    if (cur_start < offset || cur_end < cur_start) {
         qemu_printf("[DETECTED OVERFLOW!] ");
     }