From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753483AbbEAJUj (ORCPT ); Fri, 1 May 2015 05:20:39 -0400 Received: from cantor2.suse.de ([195.135.220.15]:36463 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752989AbbEAJUh (ORCPT ); Fri, 1 May 2015 05:20:37 -0400 Date: Fri, 1 May 2015 10:20:31 +0100 From: Mel Gorman To: Andrew Morton Cc: Nathan Zimmer , Dave Hansen , Waiman Long , Scott Norton , Daniel J Blueman , Linux-MM , LKML Subject: [PATCH] mm: page_alloc: pass PFN to __free_pages_bootmem -fix Message-ID: <20150501092031.GB2449@suse.de> References: <1430231830-7702-1-git-send-email-mgorman@suse.de> <1430231830-7702-5-git-send-email-mgorman@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <1430231830-7702-5-git-send-email-mgorman@suse.de> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Stephen Rothwell reported the following Today's linux-next build (sparc defconfig) failed like this: mm/bootmem.c: In function 'free_all_bootmem_core': mm/bootmem.c:237:32: error: 'cur' undeclared (first use in this function) __free_pages_bootmem(page++, cur++, 0); ^ Caused by commit "mm: page_alloc: pass PFN to __free_pages_bootmem". He also merged a fix. The only difference in this version is one line is moved so the final diff context is clearer. This is a fix to the mmotm patch mm-page_alloc-pass-pfn-to-__free_pages_bootmem.patch Signed-off-by: Mel Gorman --- mm/bootmem.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mm/bootmem.c b/mm/bootmem.c index daf956bb4782..a23dd1934654 100644 --- a/mm/bootmem.c +++ b/mm/bootmem.c @@ -172,7 +172,7 @@ void __init free_bootmem_late(unsigned long physaddr, unsigned long size) static unsigned long __init free_all_bootmem_core(bootmem_data_t *bdata) { struct page *page; - unsigned long *map, start, end, pages, count = 0; + unsigned long *map, start, end, pages, cur, count = 0; if (!bdata->node_bootmem_map) return 0; @@ -214,7 +214,7 @@ static unsigned long __init free_all_bootmem_core(bootmem_data_t *bdata) count += BITS_PER_LONG; start += BITS_PER_LONG; } else { - unsigned long cur = start; + cur = start; start = ALIGN(start + 1, BITS_PER_LONG); while (vec && cur != start) { @@ -229,6 +229,7 @@ static unsigned long __init free_all_bootmem_core(bootmem_data_t *bdata) } } + cur = bdata->node_min_pfn; page = virt_to_page(bdata->node_bootmem_map); pages = bdata->node_low_pfn - bdata->node_min_pfn; pages = bootmem_bootmap_pages(pages);