* [mmotm:master 187/242] mm/memblock.c:1290:6: error: 'early_region_idx' undeclared; did you mean 'early_pfn_to_nid'?
@ 2018-08-22 11:37 kbuild test robot
2018-08-22 16:12 ` Andrew Morton
0 siblings, 1 reply; 2+ messages in thread
From: kbuild test robot @ 2018-08-22 11:37 UTC (permalink / raw)
To: Jia He
Cc: kbuild-all, Johannes Weiner, Andrew Morton, Linux Memory Management List
[-- Attachment #1: Type: text/plain, Size: 2207 bytes --]
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':
>> 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
>> mm/memblock.c:1305:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
vim +1290 mm/memblock.c
1283
1284 int pfn_valid_region(ulong pfn)
1285 {
1286 ulong start_pfn, end_pfn;
1287 struct memblock_type *type = &memblock.memory;
1288 struct memblock_region *regions = type->regions;
1289
> 1290 if (early_region_idx != -1) {
1291 start_pfn = PFN_DOWN(regions[early_region_idx].base);
1292 end_pfn = PFN_DOWN(regions[early_region_idx].base +
1293 regions[early_region_idx].size);
1294
1295 if (pfn >= start_pfn && pfn < end_pfn)
1296 return !memblock_is_nomap(
1297 ®ions[early_region_idx]);
1298 }
1299
1300 early_region_idx = memblock_search_pfn_regions(pfn);
1301 if (early_region_idx == -1)
1302 return false;
1303
1304 return !memblock_is_nomap(®ions[early_region_idx]);
> 1305 }
1306 EXPORT_SYMBOL(pfn_valid_region);
1307 #endif /*CONFIG_HAVE_MEMBLOCK_PFN_VALID*/
1308
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 34313 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [mmotm:master 187/242] mm/memblock.c:1290:6: error: 'early_region_idx' undeclared; did you mean 'early_pfn_to_nid'?
2018-08-22 11:37 [mmotm:master 187/242] mm/memblock.c:1290:6: error: 'early_region_idx' undeclared; did you mean 'early_pfn_to_nid'? kbuild test robot
@ 2018-08-22 16:12 ` Andrew Morton
0 siblings, 0 replies; 2+ messages in thread
From: Andrew Morton @ 2018-08-22 16:12 UTC (permalink / raw)
To: kbuild test robot
Cc: Jia He, kbuild-all, Johannes Weiner,
Linux Memory Management List, Stephen Rothwell
On Wed, 22 Aug 2018 19:37:44 +0800 kbuild test robot <lkp@intel.com> 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':
> >> 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
> >> 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) {
_
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-08-22 16:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-22 11:37 [mmotm:master 187/242] mm/memblock.c:1290:6: error: 'early_region_idx' undeclared; did you mean 'early_pfn_to_nid'? kbuild test robot
2018-08-22 16:12 ` Andrew Morton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.