s390: remove superfluous memblock_alloc() return value checks
memblock_alloc() and memblock_alloc_base() will panic on their own if they can't find free memory. Therefore remove some pointless checks. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Acked-by: Michael Holzheu <holzheu@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
This commit is contained in:
committed by
Martin Schwidefsky
parent
ef1f7fd7eb
commit
cd17e153af
@@ -59,8 +59,6 @@ struct save_area * __init save_area_alloc(bool is_boot_cpu)
|
|||||||
struct save_area *sa;
|
struct save_area *sa;
|
||||||
|
|
||||||
sa = (void *) memblock_alloc(sizeof(*sa), 8);
|
sa = (void *) memblock_alloc(sizeof(*sa), 8);
|
||||||
if (!sa)
|
|
||||||
return NULL;
|
|
||||||
if (is_boot_cpu)
|
if (is_boot_cpu)
|
||||||
list_add(&sa->list, &dump_save_areas);
|
list_add(&sa->list, &dump_save_areas);
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -623,8 +623,6 @@ void __init smp_save_dump_cpus(void)
|
|||||||
return;
|
return;
|
||||||
/* Allocate a page as dumping area for the store status sigps */
|
/* Allocate a page as dumping area for the store status sigps */
|
||||||
page = memblock_alloc_base(PAGE_SIZE, PAGE_SIZE, 1UL << 31);
|
page = memblock_alloc_base(PAGE_SIZE, PAGE_SIZE, 1UL << 31);
|
||||||
if (!page)
|
|
||||||
panic("could not allocate memory for save area\n");
|
|
||||||
/* Set multi-threading state to the previous system. */
|
/* Set multi-threading state to the previous system. */
|
||||||
pcpu_set_smt(sclp.mtid_prev);
|
pcpu_set_smt(sclp.mtid_prev);
|
||||||
boot_cpu_addr = stap();
|
boot_cpu_addr = stap();
|
||||||
|
|||||||
@@ -58,8 +58,6 @@ static __init pg_data_t *alloc_node_data(void)
|
|||||||
pg_data_t *res;
|
pg_data_t *res;
|
||||||
|
|
||||||
res = (pg_data_t *) memblock_alloc(sizeof(pg_data_t), 8);
|
res = (pg_data_t *) memblock_alloc(sizeof(pg_data_t), 8);
|
||||||
if (!res)
|
|
||||||
panic("Could not allocate memory for node data!\n");
|
|
||||||
memset(res, 0, sizeof(pg_data_t));
|
memset(res, 0, sizeof(pg_data_t));
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user