The patch titled Subject: mm/memblock.c: use memblock_insert_region() for the empty array has been removed from the -mm tree. Its filename was mm-memblock-use-memblock_insert_region-for-the-empty-array.patch This patch was dropped because it had testing failures ------------------------------------------------------ From: Alexander Kuleshov <kuleshovmail@xxxxxxxxx> Subject: mm/memblock.c: use memblock_insert_region() for the empty array We have the special case for an empty array in memblock_add_range(). At the same time we have almost the same functionality in memblock_insert_region(). Let's use memblock_insert_region() instead of direct initialization. Signed-off-by: Alexander Kuleshov <kuleshovmail@xxxxxxxxx> Cc: Tony Luck <tony.luck@xxxxxxxxx> Cc: Tang Chen <tangchen@xxxxxxxxxxxxxx> Cc: Pekka Enberg <penberg@xxxxxxxxxx> Cc: Wei Yang <weiyang@xxxxxxxxxxxxxxxxxx> Cc: Tyler Baker <tyler.baker@xxxxxxxxxx> Cc: Dan Williams <dan.j.williams@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/memblock.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff -puN mm/memblock.c~mm-memblock-use-memblock_insert_region-for-the-empty-array mm/memblock.c --- a/mm/memblock.c~mm-memblock-use-memblock_insert_region-for-the-empty-array +++ a/mm/memblock.c @@ -493,12 +493,15 @@ static void __init_memblock memblock_ins struct memblock_region *rgn = &type->regions[idx]; BUG_ON(type->cnt >= type->max); - memmove(rgn + 1, rgn, (type->cnt - idx) * sizeof(*rgn)); + /* special case for empty array */ + if (idx) { + memmove(rgn + 1, rgn, (type->cnt - idx) * sizeof(*rgn)); + type->cnt++; + } rgn->base = base; rgn->size = size; rgn->flags = flags; memblock_set_region_node(rgn, nid); - type->cnt++; type->total_size += size; } @@ -534,11 +537,7 @@ int __init_memblock memblock_add_range(s /* special case for empty array */ if (type->regions[0].size == 0) { WARN_ON(type->cnt != 1 || type->total_size); - type->regions[0].base = base; - type->regions[0].size = size; - type->regions[0].flags = flags; - memblock_set_region_node(&type->regions[0], nid); - type->total_size = size; + memblock_insert_region(type, 0, base, size, nid, flags); return 0; } repeat: _ Patches currently in -mm which might be from kuleshovmail@xxxxxxxxx are mm-memblock-remove-rgnbase-and-rgnsize-variables.patch mm-memblock-introduce-for_each_memblock_type.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html