The patch titled reduce MAX_NR_ZONES: remove two strange uses of MAX_NR_ZONES has been added to the -mm tree. Its filename is reduce-max_nr_zones-remove-two-strange-uses-of-max_nr_zones.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: reduce MAX_NR_ZONES: remove two strange uses of MAX_NR_ZONES From: Christoph Lameter <clameter@xxxxxxx> Fix strange uses of MAX_NR_ZONES Sometimes we use MAX_NR_ZONES - x to refer to a zone. Make that explicit. Signed-off-by: Christoph Lameter <clameter@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- arch/i386/mm/init.c | 2 +- arch/x86_64/mm/init.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff -puN arch/i386/mm/init.c~reduce-max_nr_zones-remove-two-strange-uses-of-max_nr_zones arch/i386/mm/init.c --- a/arch/i386/mm/init.c~reduce-max_nr_zones-remove-two-strange-uses-of-max_nr_zones +++ a/arch/i386/mm/init.c @@ -657,7 +657,7 @@ void __init mem_init(void) int arch_add_memory(int nid, u64 start, u64 size) { struct pglist_data *pgdata = &contig_page_data; - struct zone *zone = pgdata->node_zones + MAX_NR_ZONES-1; + struct zone *zone = pgdata->node_zones + ZONE_HIGHMEM; unsigned long start_pfn = start >> PAGE_SHIFT; unsigned long nr_pages = size >> PAGE_SHIFT; diff -puN arch/x86_64/mm/init.c~reduce-max_nr_zones-remove-two-strange-uses-of-max_nr_zones arch/x86_64/mm/init.c --- a/arch/x86_64/mm/init.c~reduce-max_nr_zones-remove-two-strange-uses-of-max_nr_zones +++ a/arch/x86_64/mm/init.c @@ -536,7 +536,7 @@ int memory_add_physaddr_to_nid(u64 start int arch_add_memory(int nid, u64 start, u64 size) { struct pglist_data *pgdat = NODE_DATA(nid); - struct zone *zone = pgdat->node_zones + MAX_NR_ZONES-2; + struct zone *zone = pgdat->node_zones + ZONE_NORMAL; unsigned long start_pfn = start >> PAGE_SHIFT; unsigned long nr_pages = size >> PAGE_SHIFT; int ret; _ Patches currently in -mm which might be from clameter@xxxxxxx are zvc-add-__inc_zone_state-for-smp-configuration.patch reduce-max_nr_zones-remove-two-strange-uses-of-max_nr_zones.patch reduce-max_nr_zones-fix-max_nr_zones-array-initializations.patch reduce-max_nr_zones-make-display-of-highmem-counters-conditional-on-config_highmem.patch reduce-max_nr_zones-move-highmem-counters-into-highmemc-h.patch reduce-max_nr_zones-page-allocator-zone_highmem-cleanup.patch reduce-max_nr_zones-use-enum-to-define-zones-reformat-and-comment.patch reduce-max_nr_zones-make-zone_dma32-optional.patch reduce-max_nr_zones-make-zone_highmem-optional.patch reduce-max_nr_zones-remove-display-of-counters-for-unconfigured-zones.patch reduce-max_nr_zones-fix-i386-srat-check-for-max_nr_zones.patch reduce-max_nr_zones-swap_prefetch-remove-incorrect-use-of-zone_highmem.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