[PATCH RESEND 41/62] init: rename reserve_initrd_mem to reserve_initramfs_mem

Askar Safin
2025-09-14T03:52:21Z

This is cleanup after initrd removal

Signed-off-by: Askar Safin <safinaskar@gmail.com>
---
arch/arm/mm/init.c | 2 +-
arch/loongarch/kernel/setup.c | 2 +-
arch/riscv/mm/init.c | 2 +-
include/linux/initrd.h | 4 ++--
init/initramfs.c | 2 +-
5 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
index 290e9f9874c9..a564cbc36d18 100644
--- a/arch/arm/mm/init.c
+++ b/arch/arm/mm/init.c
@@ -186,7 +186,7 @@ void __init arm_memblock_init(const struct machine_desc *mdesc)
/* Register the kernel text, kernel data and initrd with memblock. */
memblock_reserve(__pa(KERNEL_START), KERNEL_END - KERNEL_START);

- reserve_initrd_mem();
+ reserve_initramfs_mem();

arm_mm_memblock_reserve();

diff --git a/arch/loongarch/kernel/setup.c b/arch/loongarch/kernel/setup.c
index 075b79b2c1d3..226262f35dc1 100644
--- a/arch/loongarch/kernel/setup.c
+++ b/arch/loongarch/kernel/setup.c
@@ -602,7 +602,7 @@ void __init setup_arch(char **cmdline_p)
pagetable_init();
bootcmdline_init(cmdline_p);
parse_early_param();
- reserve_initrd_mem();
+ reserve_initramfs_mem();

platform_init();
arch_mem_init(cmdline_p);
diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c
index 15683ae13fa5..b1c4876dadae 100644
--- a/arch/riscv/mm/init.c
+++ b/arch/riscv/mm/init.c
@@ -295,7 +295,7 @@ static void __init setup_bootmem(void)

dma32_phys_limit = min(4UL * SZ_1G, (unsigned long)PFN_PHYS(max_low_pfn));

- reserve_initrd_mem();
+ reserve_initramfs_mem();

/*
* No allocation should be done before reserving the memory as defined
diff --git a/include/linux/initrd.h b/include/linux/initrd.h
index b2a0128c3438..51c473b6a973 100644
--- a/include/linux/initrd.h
+++ b/include/linux/initrd.h
@@ -10,10 +10,10 @@ extern unsigned long virt_external_initramfs_start, virt_external_initramfs_end;
extern void free_initramfs_mem(unsigned long, unsigned long);

#ifdef CONFIG_BLK_DEV_INITRD
-extern void __init reserve_initrd_mem(void);
+extern void __init reserve_initramfs_mem(void);
extern void wait_for_initramfs(void);
#else
-static inline void __init reserve_initrd_mem(void) {}
+static inline void __init reserve_initramfs_mem(void) {}
static inline void wait_for_initramfs(void) {}
#endif

diff --git a/init/initramfs.c b/init/initramfs.c
index 7a050e54ff1a..a6c11260e62b 100644
--- a/init/initramfs.c
+++ b/init/initramfs.c
@@ -631,7 +631,7 @@ early_param("initrd", early_initrd);

static BIN_ATTR(initrd, 0440, sysfs_bin_attr_simple_read, NULL, 0);

-void __init reserve_initrd_mem(void)
+void __init reserve_initramfs_mem(void)
{
phys_addr_t start;
unsigned long size;
--
2.47.2