Re: [PATCH 01/21] MIPS memblock: Unpin dts memblock sanity check method

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Serge,

[auto build test WARNING on linus/master]
[also build test WARNING on v4.9 next-20161216]
[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/Serge-Semin/MIPS-memblock-Remove-bootmem-code-and-switch-to-NO_BOOTMEM/20161219-105045
config: i386-randconfig-i0-201651 (attached as .config)
compiler: gcc-4.8 (Debian 4.8.4-1) 4.8.4
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All warnings (new ones prefixed by >>):

   drivers/of/fdt.c: In function 'sanity_check_dt_memory':
>> drivers/of/fdt.c:1125:4: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 2 has type 'phys_addr_t' [-Wformat=]
       pr_err("Memblock 0x%llx - 0x%llx isn't page aligned\n",
       ^
   drivers/of/fdt.c:1125:4: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 3 has type 'phys_addr_t' [-Wformat=]
   drivers/of/fdt.c:1129:3: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 2 has type 'phys_addr_t' [-Wformat=]
      pr_warn("Memblock 0x%llx - 0x%llx shifted to ",
      ^
   drivers/of/fdt.c:1129:3: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 3 has type 'phys_addr_t' [-Wformat=]
   drivers/of/fdt.c:1133:3: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 2 has type 'phys_addr_t' [-Wformat=]
      pr_cont("0x%llx - 0x%llx\n", base, base + size);
      ^
   drivers/of/fdt.c:1133:3: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 3 has type 'phys_addr_t' [-Wformat=]
   drivers/of/fdt.c:1138:3: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 2 has type 'phys_addr_t' [-Wformat=]
      pr_err("Memblock 0x%llx - 0x%llx exceeds max address\n",
      ^
   drivers/of/fdt.c:1138:3: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 3 has type 'phys_addr_t' [-Wformat=]
   drivers/of/fdt.c:1144:3: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 2 has type 'phys_addr_t' [-Wformat=]
      pr_warn("Memblock 0x%llx - 0x%llx truncated to ",
      ^
   drivers/of/fdt.c:1144:3: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 3 has type 'phys_addr_t' [-Wformat=]
   drivers/of/fdt.c:1147:3: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 2 has type 'phys_addr_t' [-Wformat=]
      pr_cont("0x%llx - 0x%llx\n", base, base + size);
      ^
   drivers/of/fdt.c:1147:3: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 3 has type 'phys_addr_t' [-Wformat=]
   drivers/of/fdt.c:1151:3: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 2 has type 'phys_addr_t' [-Wformat=]
      pr_err("Memblock 0x%llx - 0x%llx is below phys offset\n",
      ^
   drivers/of/fdt.c:1151:3: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 3 has type 'phys_addr_t' [-Wformat=]
   drivers/of/fdt.c:1157:3: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 2 has type 'phys_addr_t' [-Wformat=]
      pr_warn("Memblock 0x%llx - 0x%llx truncated to ",
      ^
   drivers/of/fdt.c:1157:3: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 3 has type 'phys_addr_t' [-Wformat=]
   drivers/of/fdt.c:1161:3: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 2 has type 'phys_addr_t' [-Wformat=]
      pr_cont("0x%llx - 0x%llx\n", base, base + size);
      ^
   drivers/of/fdt.c:1161:3: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 3 has type 'phys_addr_t' [-Wformat=]
   drivers/of/fdt.c: In function 'early_init_dt_add_memory_arch':
>> drivers/of/fdt.c:1173:2: warning: passing argument 1 of 'sanity_check_dt_memory' from incompatible pointer type [enabled by default]
     if (sanity_check_dt_memory(&base, &size))
     ^
   drivers/of/fdt.c:1117:12: note: expected 'phys_addr_t *' but argument is of type 'u64 *'
    int __init sanity_check_dt_memory(phys_addr_t *out_base,
               ^
   drivers/of/fdt.c:1173:2: warning: passing argument 2 of 'sanity_check_dt_memory' from incompatible pointer type [enabled by default]
     if (sanity_check_dt_memory(&base, &size))
     ^
   drivers/of/fdt.c:1117:12: note: expected 'phys_addr_t *' but argument is of type 'u64 *'
    int __init sanity_check_dt_memory(phys_addr_t *out_base,
               ^

vim +1125 drivers/of/fdt.c

  1119	{
  1120		phys_addr_t base = *out_base, size = *out_size;
  1121		const u64 phys_offset = MIN_MEMBLOCK_ADDR;
  1122	
  1123		if (!PAGE_ALIGNED(base)) {
  1124			if (size < PAGE_SIZE - (base & ~PAGE_MASK)) {
> 1125				pr_err("Memblock 0x%llx - 0x%llx isn't page aligned\n",
  1126					base, base + size);
  1127				return -EINVAL;
  1128			}
  1129			pr_warn("Memblock 0x%llx - 0x%llx shifted to ",
  1130				base, base + size);
  1131			size -= PAGE_SIZE - (base & ~PAGE_MASK);
  1132			base = PAGE_ALIGN(base);
  1133			pr_cont("0x%llx - 0x%llx\n", base, base + size);
  1134		}
  1135		size &= PAGE_MASK;
  1136	
  1137		if (base > MAX_MEMBLOCK_ADDR) {
  1138			pr_err("Memblock 0x%llx - 0x%llx exceeds max address\n",
  1139				base, base + size);
  1140			return -EINVAL;
  1141		}
  1142	
  1143		if (base + size - 1 > MAX_MEMBLOCK_ADDR) {
  1144			pr_warn("Memblock 0x%llx - 0x%llx truncated to ",
  1145				base, base + size);
  1146			size = MAX_MEMBLOCK_ADDR - base + 1;
  1147			pr_cont("0x%llx - 0x%llx\n", base, base + size);
  1148		}
  1149	
  1150		if (base + size < phys_offset) {
  1151			pr_err("Memblock 0x%llx - 0x%llx is below phys offset\n",
  1152				base, base + size);
  1153			return -EINVAL;
  1154		}
  1155	
  1156		if (base < phys_offset) {
> 1157			pr_warn("Memblock 0x%llx - 0x%llx truncated to ",
  1158				base, base + size);
  1159			size -= phys_offset - base;
  1160			base = phys_offset;
  1161			pr_cont("0x%llx - 0x%llx\n", base, base + size);
  1162		}
  1163	
  1164		/* Set the output base address and size */
  1165		*out_base = base;
  1166		*out_size = size;
  1167	
  1168		return 0;
  1169	}
  1170	
  1171	void __init __weak early_init_dt_add_memory_arch(u64 base, u64 size)
  1172	{
> 1173		if (sanity_check_dt_memory(&base, &size))
  1174			return;
  1175	
  1176		memblock_add(base, size);

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux