[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 15/15] memory: clean up phys_page_find
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PATCH 15/15] memory: clean up phys_page_find |
Date: |
Fri, 24 May 2013 19:03:07 +0200 |
Remove the goto.
Reviewed-by: Peter Maydell <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
exec.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/exec.c b/exec.c
index 3fdca46..3a9ddcb 100644
--- a/exec.c
+++ b/exec.c
@@ -187,19 +187,15 @@ MemoryRegionSection *phys_page_find(AddressSpaceDispatch
*d, hwaddr index)
PhysPageEntry lp = d->phys_map;
PhysPageEntry *p;
int i;
- uint16_t s_index = phys_section_unassigned;
for (i = P_L2_LEVELS - 1; i >= 0 && !lp.is_leaf; i--) {
if (lp.ptr == PHYS_MAP_NODE_NIL) {
- goto not_found;
+ return &phys_sections[phys_section_unassigned];
}
p = phys_map_nodes[lp.ptr];
lp = p[(index >> (i * L2_BITS)) & (L2_SIZE - 1)];
}
-
- s_index = lp.ptr;
-not_found:
- return &phys_sections[s_index];
+ return &phys_sections[lp.ptr];
}
bool memory_region_is_unassigned(MemoryRegion *mr)
--
1.8.1.4
- [Qemu-devel] [PATCH 11/15] memory: fix address space initialization/destruction, (continued)
- [Qemu-devel] [PATCH 11/15] memory: fix address space initialization/destruction, Paolo Bonzini, 2013/05/24
- [Qemu-devel] [PATCH 12/15] s390x: reduce TARGET_PHYS_ADDR_SPACE_BITS to 62, Paolo Bonzini, 2013/05/24
- Re: [Qemu-devel] [PATCH 12/15] s390x: reduce TARGET_PHYS_ADDR_SPACE_BITS to 62, Andreas Färber, 2013/05/26
- Re: [Qemu-devel] [PATCH 12/15] s390x: reduce TARGET_PHYS_ADDR_SPACE_BITS to 62, Paolo Bonzini, 2013/05/26
- Re: [Qemu-devel] [PATCH 12/15] s390x: reduce TARGET_PHYS_ADDR_SPACE_BITS to 62, Christian Borntraeger, 2013/05/26
- Re: [Qemu-devel] [PATCH 12/15] s390x: reduce TARGET_PHYS_ADDR_SPACE_BITS to 62, Paolo Bonzini, 2013/05/27
- Re: [Qemu-devel] [PATCH 12/15] s390x: reduce TARGET_PHYS_ADDR_SPACE_BITS to 62, Andreas Färber, 2013/05/27
- Re: [Qemu-devel] [PATCH 12/15] s390x: reduce TARGET_PHYS_ADDR_SPACE_BITS to 62, Paolo Bonzini, 2013/05/27
[Qemu-devel] [PATCH 13/15] memory: limit sections in the radix tree to the actual address space size, Paolo Bonzini, 2013/05/24
[Qemu-devel] [PATCH 14/15] memory: populate FlatView for new address spaces, Paolo Bonzini, 2013/05/24
[Qemu-devel] [PATCH 15/15] memory: clean up phys_page_find,
Paolo Bonzini <=
Re: [Qemu-devel] [PULL 00/15] IOMMU patches for 1.6, part 1, Paolo Bonzini, 2013/05/27