[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 2/6] exec.c: remove an unnecessary assert on PHYS_MA
From: |
Wei Yang |
Subject: |
[Qemu-devel] [PATCH 2/6] exec.c: remove an unnecessary assert on PHYS_MAP_NODE_NIL in phys_map_node_alloc() |
Date: |
Thu, 21 Mar 2019 16:25:51 +0800 |
PHYS_MAP_NODE_NIL is assigned to PhysPageEntry.ptr in case this is not a
leaf entry, while map->nodes_nb range in [0, nodes_nb_alloc).
Seems we are asserting on two different things, just remove it.
Signed-off-by: Wei Yang <address@hidden>
---
exec.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/exec.c b/exec.c
index 98ebd0dd1d..8e8b6bb1f9 100644
--- a/exec.c
+++ b/exec.c
@@ -242,7 +242,6 @@ static uint32_t phys_map_node_alloc(PhysPageMap *map, bool
leaf)
ret = map->nodes_nb++;
p = map->nodes[ret];
- assert(ret != PHYS_MAP_NODE_NIL);
assert(ret != map->nodes_nb_alloc);
e.skip = leaf ? 0 : 1;
--
2.19.1
- [Qemu-devel] [PATCH 0/6] Refine exec, Wei Yang, 2019/03/21
- [Qemu-devel] [PATCH 1/6] exec.c: replace hwaddr with uint64_t for better understanding, Wei Yang, 2019/03/21
- [Qemu-devel] [PATCH 2/6] exec.c: remove an unnecessary assert on PHYS_MAP_NODE_NIL in phys_map_node_alloc(),
Wei Yang <=
- [Qemu-devel] [PATCH 3/6] exec.c: get nodes_nb_alloc with one MAX calculation, Wei Yang, 2019/03/21
- [Qemu-devel] [PATCH 4/6] exec.c: subpage->sub_section is already initialized to 0, Wei Yang, 2019/03/21
- [Qemu-devel] [PATCH 5/6] exec.c: correct the maximum skip value during compact, Wei Yang, 2019/03/21
- [Qemu-devel] [PATCH 6/6] exec.c: add a check between constants to see whether we could skip, Wei Yang, 2019/03/21