Add return value to reserve_bootmem_node()

This patch changes the function reserve_bootmem_node() from void to int,
returning -ENOMEM if the allocation fails.

This fixes a build problem on x86 with CONFIG_KEXEC=y and
CONFIG_NEED_MULTIPLE_NODES=y

Signed-off-by: Bernhard Walle <bwalle@suse.de>
Reported-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by Bernhard Walle and committed by Linus Torvalds 71c2742f a1921443

+5 -3
+1 -1
include/linux/bootmem.h
··· 94 94 unsigned long freepfn, 95 95 unsigned long startpfn, 96 96 unsigned long endpfn); 97 - extern void reserve_bootmem_node(pg_data_t *pgdat, 97 + extern int reserve_bootmem_node(pg_data_t *pgdat, 98 98 unsigned long physaddr, 99 99 unsigned long size, 100 100 int flags);
+4 -2
mm/bootmem.c
··· 442 442 return init_bootmem_core(pgdat, freepfn, startpfn, endpfn); 443 443 } 444 444 445 - void __init reserve_bootmem_node(pg_data_t *pgdat, unsigned long physaddr, 445 + int __init reserve_bootmem_node(pg_data_t *pgdat, unsigned long physaddr, 446 446 unsigned long size, int flags) 447 447 { 448 448 int ret; 449 449 450 450 ret = can_reserve_bootmem_core(pgdat->bdata, physaddr, size, flags); 451 451 if (ret < 0) 452 - return; 452 + return -ENOMEM; 453 453 reserve_bootmem_core(pgdat->bdata, physaddr, size, flags); 454 + 455 + return 0; 454 456 } 455 457 456 458 void __init free_bootmem_node(pg_data_t *pgdat, unsigned long physaddr,