MIPS: Fix build with CONFIG_PROC_VMCORE=y
authorPaul Burton <paul.burton@mips.com>
Fri, 23 Aug 2019 17:00:38 +0000 (18:00 +0100)
committerPaul Burton <paul.burton@mips.com>
Fri, 23 Aug 2019 17:02:49 +0000 (18:02 +0100)
Commit a94e4f24ec83 ("MIPS: init: Drop boot_mem_map") introduced a
reference to a non-existant "end" field in struct memblock_region.
Replace it with a sum of the base & size fields to fix builds with
CONFIG_PROC_VMCORE=y.

Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Paul Burton <paul.burton@mips.com>
arch/mips/kernel/setup.c

index 90c44e1..2f13814 100644 (file)
@@ -458,7 +458,7 @@ static int __init early_parse_elfcorehdr(char *p)
 
         for_each_memblock(memory, mem) {
                unsigned long start = mem->base;
-               unsigned long end = mem->end;
+               unsigned long end = start + mem->size;
                if (setup_elfcorehdr >= start && setup_elfcorehdr < end) {
                        /*
                         * Reserve from the elf core header to the end of