diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/dlmalloc.c | 6 | ||||
-rw-r--r-- | common/spl/spl_opensbi.c | 7 |
2 files changed, 7 insertions, 6 deletions
diff --git a/common/dlmalloc.c b/common/dlmalloc.c index 0f9b7262d5..dcecdb8623 100644 --- a/common/dlmalloc.c +++ b/common/dlmalloc.c @@ -631,7 +631,7 @@ void mem_malloc_init(ulong start, ulong size) debug("using memory %#lx-%#lx for malloc()\n", mem_malloc_start, mem_malloc_end); -#ifdef CONFIG_SYS_MALLOC_CLEAR_ON_INIT +#if CONFIG_IS_ENABLED(SYS_MALLOC_CLEAR_ON_INIT) memset((void *)mem_malloc_start, 0x0, size); #endif malloc_bin_reloc(); @@ -2153,7 +2153,7 @@ Void_t* cALLOc(n, elem_size) size_t n; size_t elem_size; /* check if expand_top called, in which case don't need to clear */ -#ifdef CONFIG_SYS_MALLOC_CLEAR_ON_INIT +#if CONFIG_IS_ENABLED(SYS_MALLOC_CLEAR_ON_INIT) #if MORECORE_CLEARS mchunkptr oldtop = top; INTERNAL_SIZE_T oldtopsize = chunksize(top); @@ -2184,7 +2184,7 @@ Void_t* cALLOc(n, elem_size) size_t n; size_t elem_size; csz = chunksize(p); -#ifdef CONFIG_SYS_MALLOC_CLEAR_ON_INIT +#if CONFIG_IS_ENABLED(SYS_MALLOC_CLEAR_ON_INIT) #if MORECORE_CLEARS if (p == oldtop && csz > oldtopsize) { diff --git a/common/spl/spl_opensbi.c b/common/spl/spl_opensbi.c index b0f40076c3..e2aaa46046 100644 --- a/common/spl/spl_opensbi.c +++ b/common/spl/spl_opensbi.c @@ -43,11 +43,12 @@ static int spl_opensbi_find_uboot_node(void *blob, int *uboot_node) return -ENODEV; } -void spl_invoke_opensbi(struct spl_image_info *spl_image) +void __noreturn spl_invoke_opensbi(struct spl_image_info *spl_image) { int ret, uboot_node; ulong uboot_entry; - void (*opensbi_entry)(ulong hartid, ulong dtb, ulong info); + typedef void __noreturn (*opensbi_entry_t)(ulong hartid, ulong dtb, ulong info); + opensbi_entry_t opensbi_entry; if (!spl_image->fdt_addr) { pr_err("No device tree specified in SPL image\n"); @@ -74,7 +75,7 @@ void spl_invoke_opensbi(struct spl_image_info *spl_image) opensbi_info.options = CONFIG_SPL_OPENSBI_SCRATCH_OPTIONS; opensbi_info.boot_hart = gd->arch.boot_hart; - opensbi_entry = (void (*)(ulong, ulong, ulong))spl_image->entry_point; + opensbi_entry = (opensbi_entry_t)spl_image->entry_point; invalidate_icache_all(); #ifdef CONFIG_SPL_SMP |