Re: [PATCH] mm/memblock.c: fix NULL dereference error
From: kbuild test robot
Date: Tue Aug 02 2016 - 01:27:54 EST
Hi zijun_hu,
[auto build test WARNING on mmotm/master]
[also build test WARNING on v4.7 next-20160801]
[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/zijun_hu/mm-memblock-c-fix-NULL-dereference-error/20160802-130708
base: git://git.cmpxchg.org/linux-mmotm.git master
config: i386-randconfig-x009-201631 (attached as .config)
compiler: gcc-6 (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
All warnings (new ones prefixed by >>):
In file included from include/linux/kernel.h:13:0,
from mm/memblock.c:13:
mm/memblock.c: In function 'memblock_patch_verify':
>> mm/memblock.c:1713:11: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 3 has type 'phys_addr_t {aka unsigned int}' [-Wformat=]
pr_info("[%#016llx]\t[%#016llx-%#016llx]\n",
^
include/linux/printk.h:260:21: note: in definition of macro 'pr_fmt'
#define pr_fmt(fmt) fmt
^~~
>> mm/memblock.c:1713:3: note: in expansion of macro 'pr_info'
pr_info("[%#016llx]\t[%#016llx-%#016llx]\n",
^~~~~~~
mm/memblock.c:1713:11: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 4 has type 'phys_addr_t {aka unsigned int}' [-Wformat=]
pr_info("[%#016llx]\t[%#016llx-%#016llx]\n",
^
include/linux/printk.h:260:21: note: in definition of macro 'pr_fmt'
#define pr_fmt(fmt) fmt
^~~
>> mm/memblock.c:1713:3: note: in expansion of macro 'pr_info'
pr_info("[%#016llx]\t[%#016llx-%#016llx]\n",
^~~~~~~
mm/memblock.c:1719:11: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 3 has type 'phys_addr_t {aka unsigned int}' [-Wformat=]
pr_info("[%#016llx]\t[%#016llx-%#016llx]\n",
^
include/linux/printk.h:260:21: note: in definition of macro 'pr_fmt'
#define pr_fmt(fmt) fmt
^~~
mm/memblock.c:1719:3: note: in expansion of macro 'pr_info'
pr_info("[%#016llx]\t[%#016llx-%#016llx]\n",
^~~~~~~
mm/memblock.c:1719:11: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 4 has type 'phys_addr_t {aka unsigned int}' [-Wformat=]
pr_info("[%#016llx]\t[%#016llx-%#016llx]\n",
^
include/linux/printk.h:260:21: note: in definition of macro 'pr_fmt'
#define pr_fmt(fmt) fmt
^~~
mm/memblock.c:1719:3: note: in expansion of macro 'pr_info'
pr_info("[%#016llx]\t[%#016llx-%#016llx]\n",
^~~~~~~
mm/memblock.c:1726:11: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 3 has type 'phys_addr_t {aka unsigned int}' [-Wformat=]
pr_info("[%#016llx]\t[%#016llx-%#016llx]\n",
^
include/linux/printk.h:260:21: note: in definition of macro 'pr_fmt'
#define pr_fmt(fmt) fmt
^~~
mm/memblock.c:1726:3: note: in expansion of macro 'pr_info'
pr_info("[%#016llx]\t[%#016llx-%#016llx]\n",
^~~~~~~
mm/memblock.c:1726:11: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 4 has type 'phys_addr_t {aka unsigned int}' [-Wformat=]
pr_info("[%#016llx]\t[%#016llx-%#016llx]\n",
^
include/linux/printk.h:260:21: note: in definition of macro 'pr_fmt'
#define pr_fmt(fmt) fmt
^~~
mm/memblock.c:1726:3: note: in expansion of macro 'pr_info'
pr_info("[%#016llx]\t[%#016llx-%#016llx]\n",
^~~~~~~
vim +1713 mm/memblock.c
1697 pr_info(" memory size = %#llx reserved size = %#llx\n",
1698 (unsigned long long)memblock.memory.total_size,
1699 (unsigned long long)memblock.reserved.total_size);
1700
1701 memblock_dump(&memblock.memory, "memory");
1702 memblock_dump(&memblock.reserved, "reserved");
1703 }
1704
1705 void __init_memblock memblock_patch_verify(void)
1706 {
1707 u64 i;
1708 phys_addr_t this_start, this_end;
1709
1710 pr_info("in %s: memory\n", __func__);
1711 for_each_mem_range_rev(i, &memblock.memory, NULL, NUMA_NO_NODE,
1712 MEMBLOCK_NONE, &this_start, &this_end, NULL)
> 1713 pr_info("[%#016llx]\t[%#016llx-%#016llx]\n",
1714 i, this_start, this_end);
1715
1716 pr_info("in %s: reserved\n", __func__);
1717 for_each_mem_range_rev(i, &memblock.reserved, NULL, NUMA_NO_NODE,
1718 MEMBLOCK_NONE, &this_start, &this_end, NULL)
1719 pr_info("[%#016llx]\t[%#016llx-%#016llx]\n",
1720 i, this_start, this_end);
1721
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: Binary data