Message ID | 1495781157-10829-1-git-send-email-gwshan@linux.vnet.ibm.com |
---|---|
State | Rejected |
Headers | show |
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;
__mem_alloc(), the only caller of this function, has the validation. No need to do it again. Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> --- core/mem_region.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)