LKML Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] firmware/memmap:Modify memblock_alloc to memblock_alloc_nopanic
@ 2018-12-24  8:41 huang.zijiang
  2018-12-24 12:14 ` Mike Rapoport
  0 siblings, 1 reply; 2+ messages in thread
From: huang.zijiang @ 2018-12-24  8:41 UTC (permalink / raw)
  To: akpm
  Cc: rppt, mhocko, sfr, mpe, linux-kernel, xue.zhihong, wang.yi59,
	huang.zijiang

From: "huang.zijiang" <huang.zijiang@zte.com.cn>

memblock_alloc never returns NULL because panic never returns

Signed-off-by: huang.zijiang <huang.zijiang@zte.com.cn>
---
 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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] firmware/memmap:Modify memblock_alloc to memblock_alloc_nopanic
  2018-12-24  8:41 [PATCH] firmware/memmap:Modify memblock_alloc to memblock_alloc_nopanic huang.zijiang
@ 2018-12-24 12:14 ` Mike Rapoport
  0 siblings, 0 replies; 2+ messages in thread
From: Mike Rapoport @ 2018-12-24 12:14 UTC (permalink / raw)
  To: huang.zijiang
  Cc: akpm, rppt, mhocko, sfr, mpe, linux-kernel, xue.zhihong, wang.yi59

On Mon, Dec 24, 2018 at 04:41:22PM +0800, huang.zijiang wrote:
> From: "huang.zijiang" <huang.zijiang@zte.com.cn>
> 
> memblock_alloc never returns NULL because panic never returns
> 
> Signed-off-by: huang.zijiang <huang.zijiang@zte.com.cn>

Acked-by: Mike Rapoport <rppt@linux.ibm.com>

> ---
>  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.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-24  8:41 [PATCH] firmware/memmap:Modify memblock_alloc to memblock_alloc_nopanic huang.zijiang
2018-12-24 12:14 ` Mike Rapoport

LKML Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/lkml/0 lkml/git/0.git
	git clone --mirror https://lore.kernel.org/lkml/1 lkml/git/1.git
	git clone --mirror https://lore.kernel.org/lkml/2 lkml/git/2.git
	git clone --mirror https://lore.kernel.org/lkml/3 lkml/git/3.git
	git clone --mirror https://lore.kernel.org/lkml/4 lkml/git/4.git
	git clone --mirror https://lore.kernel.org/lkml/5 lkml/git/5.git
	git clone --mirror https://lore.kernel.org/lkml/6 lkml/git/6.git
	git clone --mirror https://lore.kernel.org/lkml/7 lkml/git/7.git
	git clone --mirror https://lore.kernel.org/lkml/8 lkml/git/8.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 lkml lkml/ https://lore.kernel.org/lkml \
		linux-kernel@vger.kernel.org
	public-inbox-index lkml

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-kernel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git