Thread (2 messages) 2 messages, 2 authors, 2018-08-22

Re: [mmotm:master 187/242] mm/memblock.c:1290:6: error: 'early_region_idx' undeclared; did you mean 'early_pfn_to_nid'?

From: Andrew Morton <akpm@linux-foundation.org>
Date: 2018-08-22 16:12:37

On Wed, 22 Aug 2018 19:37:44 +0800 kbuild test robot [off-list ref] wrote:
tree:   git://git.cmpxchg.org/linux-mmotm.git master
head:   10b78d76f1897885d7753586ecd113e9d6728c5d
commit: be2e6e87ac5e7f8f30c442bb1a042266e1ab6fcd [187/242] mm/memblock: introduce pfn_valid_region()
config: arm-omap2plus_defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout be2e6e87ac5e7f8f30c442bb1a042266e1ab6fcd
        # save the attached .config to linux build tree
        GCC_VERSION=7.2.0 make.cross ARCH=arm 

All error/warnings (new ones prefixed by >>):

   mm/memblock.c: In function 'pfn_valid_region':
quoted
quoted
mm/memblock.c:1290:6: error: 'early_region_idx' undeclared (first use in this function); did you mean 'early_pfn_to_nid'?
     if (early_region_idx != -1) {
         ^~~~~~~~~~~~~~~~
         early_pfn_to_nid
   mm/memblock.c:1290:6: note: each undeclared identifier is reported only once for each function it appears in
quoted
quoted
mm/memblock.c:1305:1: warning: control reaches end of non-void function [-Wreturn-type]
    }
oops
--- a/mm/memblock.c~mm-page_alloc-reduce-unnecessary-binary-search-in-memblock_next_valid_pfn-fix-fix
+++ a/mm/memblock.c
@@ -1232,6 +1232,7 @@ int __init_memblock memblock_set_node(ph
 #endif /* CONFIG_HAVE_MEMBLOCK_NODE_MAP */
 
 #ifdef CONFIG_HAVE_MEMBLOCK_PFN_VALID
+static int early_region_idx __initdata_memblock = -1;
 unsigned long __init_memblock memblock_next_valid_pfn(unsigned long pfn)
 {
 	struct memblock_type *type = &memblock.memory;
@@ -1240,7 +1241,6 @@ unsigned long __init_memblock memblock_n
 	uint mid, left = 0;
 	unsigned long start_pfn, end_pfn, next_start_pfn;
 	phys_addr_t addr = PFN_PHYS(++pfn);
-	static int early_region_idx __initdata_memblock = -1;
 
 	/* fast path, return pfn+1 if next pfn is in the same region */
 	if (early_region_idx != -1) {
_
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help