[Skiboot] [PATCH] core/mem_region: Don't validate region type in init_allocatable_region()

Gavin Shan gwshan at linux.vnet.ibm.com
Fri May 26 16:45:57 AEST 2017


__mem_alloc(), the only caller of this function, has the validation.
No need to do it again.

Signed-off-by: Gavin Shan <gwshan at linux.vnet.ibm.com>
---
 core/mem_region.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/core/mem_region.c b/core/mem_region.c
index bfb5ac9..cb59379 100644
--- a/core/mem_region.c
+++ b/core/mem_region.c
@@ -156,8 +156,7 @@ static inline void mem_poison(struct free_hdr *f __unused) { }
 static void init_allocatable_region(struct mem_region *region)
 {
 	struct free_hdr *f = region_start(region);
-	assert(region->type == REGION_SKIBOOT_HEAP ||
-	       region->type == REGION_MEMORY);
+
 	f->hdr.num_longs = region->len / sizeof(long);
 	f->hdr.free = true;
 	f->hdr.prev_free = false;
-- 
2.7.4



More information about the Skiboot mailing list