lkml.org 
[lkml]   [2018]   [Mar]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 4/5] arm64: introduce pfn_valid_region()
Hi Jia,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on mmotm/master]
[cannot apply to v4.16-rc6]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/Jia-He/optimize-memblock_next_valid_pfn-and-early_pfn_valid/20180325-175026
base: git://git.cmpxchg.org/linux-mmotm.git master
config: arm64-defconfig (attached as .config)
compiler: aarch64-linux-gnu-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
# save the attached .config to linux build tree
make.cross ARCH=arm64

All warnings (new ones prefixed by >>):

arch/arm64/mm/init.c: In function 'pfn_valid_region':
>> arch/arm64/mm/init.c:304:35: warning: self-comparison always evaluates to false [-Wtautological-compare]
if (pfn >= start_pfn && end_pfn < end_pfn)
^

vim +304 arch/arm64/mm/init.c

293
294 int pfn_valid_region(unsigned long pfn, int *last_idx)
295 {
296 unsigned long start_pfn, end_pfn;
297 struct memblock_type *type = &memblock.memory;
298
299 if (*last_idx != -1) {
300 start_pfn = PFN_DOWN(type->regions[*last_idx].base);
301 end_pfn= PFN_DOWN(type->regions[*last_idx].base +
302 type->regions[*last_idx].size);
303
> 304 if (pfn >= start_pfn && end_pfn < end_pfn)
305 return !memblock_is_nomap(
306 &memblock.memory.regions[*last_idx]);
307 }
308
309 *last_idx = memblock_search_pfn_regions(pfn);
310 if (*last_idx == -1)
311 return false;
312
313 return !memblock_is_nomap(&memblock.memory.regions[*last_idx]);
314 }
315 EXPORT_SYMBOL(pfn_valid_region);
316 #endif /*CONFIG_HAVE_ARCH_PFN_VALID*/
317

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2018-03-25 16:17    [W:0.115 / U:21.204 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site