Thread (6 messages) 6 messages, 5 authors, 2025-01-07

Re: [PATCH v7] mm/memblock: Add memblock_alloc_or_panic interface

From: Xi Ruoyao <xry111@xry111.site>
Date: 2024-12-23 07:16:12
Also in: linux-acpi, linux-alpha, linux-clk, linux-devicetree, linux-m68k, linux-mips, linux-mm, linux-omap, linux-pm, linux-riscv, linux-s390, linux-sh, linux-um, lkml, loongarch, sparclinux, xen-devel

On Mon, 2024-12-23 at 09:12 +0200, Mike Rapoport wrote:
On Sun, Dec 22, 2024 at 07:15:37PM +0800, Guo Weikang wrote:
quoted
Before SLUB initialization, various subsystems used memblock_alloc to
allocate memory. In most cases, when memory allocation fails, an immediate
panic is required. To simplify this behavior and reduce repetitive checks,
introduce `memblock_alloc_or_panic`. This function ensures that memory
allocation failures result in a panic automatically, improving code
readability and consistency across subsystems that require this behavior.

Changelog:
----------
v1: initial version
v2: add __memblock_alloc_or_panic support panic output caller
v3: panic output phys_addr_t use printk's %pap
v4: make __memblock_alloc_or_panic out-of-line, move to memblock.c
v6: Fix CI compile error
Links to CI: https://lore.kernel.org/oe-kbuild-all/202412221000.r1NzXJUO-lkp@intel.com/ (local)
v6: Fix CI compile warinigs
Links to CI: https://lore.kernel.org/oe-kbuild-all/202412221259.JuGNAUCq-lkp@intel.com/ (local)
v7: add chagelog and adjust function declaration alignment format
----------

Signed-off-by: Guo Weikang <redacted>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reviewed-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Acked-by: Xi Ruoyao <xry111@xry111.site>
If people commented on your patch it does not mean you should add
Reviewed-by or Acked-by tags for them. Wait for explicit tags from the
reviewers.
And:

 - Acked-by: indicates an agreement by another developer (often a
   maintainer of the relevant code) that the patch is appropriate for
   inclusion into the kernel. 

I'm not a maintainer so I even don't have the right to use Acked-by :).

-- 
Xi Ruoyao [off-list ref]
School of Aerospace Science and Technology, Xidian University
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help