Re: [PATCH] firmware/memmap:Modify memblock_alloc to memblock_alloc_nopanic
From: Mike Rapoport
Date: Mon Dec 24 2018 - 07:15:32 EST
On Mon, Dec 24, 2018 at 04:41:22PM +0800, huang.zijiang wrote:
> From: "huang.zijiang" <huang.zijiang@xxxxxxxxxx>
>
> memblock_alloc never returns NULL because panic never returns
>
> Signed-off-by: huang.zijiang <huang.zijiang@xxxxxxxxxx>
Acked-by: Mike Rapoport <rppt@xxxxxxxxxxxxx>
> ---
> drivers/firmware/memmap.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/firmware/memmap.c b/drivers/firmware/memmap.c
> index d168c87..ec4fd25 100644
> --- a/drivers/firmware/memmap.c
> +++ b/drivers/firmware/memmap.c
> @@ -333,7 +333,7 @@ int __init firmware_map_add_early(u64 start, u64 end, const char *type)
> {
> struct firmware_map_entry *entry;
>
> - entry = memblock_alloc(sizeof(struct firmware_map_entry),
> + entry = memblock_alloc_nopanic(sizeof(struct firmware_map_entry),
> SMP_CACHE_BYTES);
> if (WARN_ON(!entry))
> return -ENOMEM;
> --
> 1.8.3.1
>
--
Sincerely yours,
Mike.