The patch titled Subject: drivers/base/memory.c: remove an unnecessary check on NR_MEM_SECTIONS has been removed from the -mm tree. Its filename was drivers-base-memoryc-remove-an-unnecessary-check-on-nr_mem_sections.patch This patch was dropped because it was merged into mainline or a subsystem tree ------------------------------------------------------ From: Wei Yang <richard.weiyang@xxxxxxxxx> Subject: drivers/base/memory.c: remove an unnecessary check on NR_MEM_SECTIONS In cb5e39b8038b ("drivers: base: refactor add_memory_section() to add_memory_block()"), add_memory_block() is introduced, which is only invoked in memory_dev_init(). When combining these two loops in memory_dev_init() and add_memory_block(), they looks like this: for (i = 0; i < NR_MEM_SECTIONS; i += sections_per_block) for (j = i; (j < i + sections_per_block) && j < NR_MEM_SECTIONS; j++) Since it is sure the (i < NR_MEM_SECTIONS) and j sits in its own memory block, the check of (j < NR_MEM_SECTIONS) is not necessary. This patch just removes this check. Link: http://lkml.kernel.org/r/20181123222811.18216-1-richard.weiyang@xxxxxxxxx Signed-off-by: Wei Yang <richard.weiyang@xxxxxxxxx> Reviewed-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> Cc: "Rafael J. Wysocki" <rafael@xxxxxxxxxx> Cc: Seth Jennings <sjenning@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- --- a/drivers/base/memory.c~drivers-base-memoryc-remove-an-unnecessary-check-on-nr_mem_sections +++ a/drivers/base/memory.c @@ -688,7 +688,7 @@ static int add_memory_block(int base_sec int i, ret, section_count = 0, section_nr; for (i = base_section_nr; - (i < base_section_nr + sections_per_block) && i < NR_MEM_SECTIONS; + i < base_section_nr + sections_per_block; i++) { if (!present_section_nr(i)) continue; _ Patches currently in -mm which might be from richard.weiyang@xxxxxxxxx are mm-page_alloc-calculate-first_deferred_pfn-directly.patch