From: Bernhard Walle Date: Sat, 21 Jun 2008 17:01:02 +0000 (+0200) Subject: Add return value to reserve_bootmem_node() X-Git-Tag: v2.6.25.9~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8c3a10753bfb7ba66b024398cc9bad9eea82a99f;p=thirdparty%2Fkernel%2Fstable.git Add return value to reserve_bootmem_node() commit 71c2742f5e6348d76ee62085cf0a13e5eff0f00e upstream 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 Reported-by: Adrian Bunk Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- diff --git a/include/linux/bootmem.h b/include/linux/bootmem.h index 4e4e340592fb0..db3d837be1cac 100644 --- a/include/linux/bootmem.h +++ b/include/linux/bootmem.h @@ -94,7 +94,7 @@ extern unsigned long init_bootmem_node(pg_data_t *pgdat, unsigned long freepfn, unsigned long startpfn, unsigned long endpfn); -extern void reserve_bootmem_node(pg_data_t *pgdat, +extern int reserve_bootmem_node(pg_data_t *pgdat, unsigned long physaddr, unsigned long size, int flags); diff --git a/mm/bootmem.c b/mm/bootmem.c index 2ccea700968f7..8bb58daeeedbf 100644 --- a/mm/bootmem.c +++ b/mm/bootmem.c @@ -398,10 +398,10 @@ unsigned long __init init_bootmem_node(pg_data_t *pgdat, unsigned long freepfn, return init_bootmem_core(pgdat, freepfn, startpfn, endpfn); } -void __init reserve_bootmem_node(pg_data_t *pgdat, unsigned long physaddr, +int __init reserve_bootmem_node(pg_data_t *pgdat, unsigned long physaddr, unsigned long size, int flags) { - reserve_bootmem_core(pgdat->bdata, physaddr, size, flags); + return reserve_bootmem_core(pgdat->bdata, physaddr, size, flags); } void __init free_bootmem_node(pg_data_t *pgdat, unsigned long physaddr,