[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 1/3] memory: Better name 'offset' argument in mtree_print_mr()
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 1/3] memory: Better name 'offset' argument in mtree_print_mr() |
Date: |
Sat, 6 Mar 2021 00:54:12 +0100 |
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 --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!] ");
}
--
2.26.2
- [PATCH 0/3] memory: Display AddressSpace zero-based in 'info mtree', Philippe Mathieu-Daudé, 2021/03/05
- [PATCH 1/3] memory: Better name 'offset' argument in mtree_print_mr(),
Philippe Mathieu-Daudé <=
- [PATCH 2/3] memory: Provide 'base address' argument to mtree_print_mr(), Philippe Mathieu-Daudé, 2021/03/05
- Re: [PATCH 2/3] memory: Provide 'base address' argument to mtree_print_mr(), Peter Xu, 2021/03/08
- Re: [PATCH 2/3] memory: Provide 'base address' argument to mtree_print_mr(), Philippe Mathieu-Daudé, 2021/03/09
- Re: [PATCH 2/3] memory: Provide 'base address' argument to mtree_print_mr(), Philippe Mathieu-Daudé, 2021/03/09
- Re: [PATCH 2/3] memory: Provide 'base address' argument to mtree_print_mr(), Peter Xu, 2021/03/10
- Re: [PATCH 2/3] memory: Provide 'base address' argument to mtree_print_mr(), Philippe Mathieu-Daudé, 2021/03/10
- [PATCH 1/2] hw/mips/jazz: Use generic I/O bus via get_system_io(), Philippe Mathieu-Daudé, 2021/03/10
- [PATCH 2/2] NOTFORMERGE memory: Ensure AddressSpace physical base address is zero, Philippe Mathieu-Daudé, 2021/03/10
- Re: [PATCH 1/2] hw/mips/jazz: Use generic I/O bus via get_system_io(), Peter Xu, 2021/03/10
- Re: [PATCH 1/2] hw/mips/jazz: Use generic I/O bus via get_system_io(), Philippe Mathieu-Daudé, 2021/03/10