[PATCH RESEND 52/62] init: rename do_retain_initrd to retain_initramfs

Askar Safin
2025-09-14T03:58:57Z

This is cleanup after initrd removal

Signed-off-by: Askar Safin <safinaskar@gmail.com>
---
init/initramfs.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/init/initramfs.c b/init/initramfs.c
index 30e94ebf4902..40c8e4b05886 100644
--- a/init/initramfs.c
+++ b/init/initramfs.c
@@ -570,13 +570,13 @@ char * __init unpack_to_rootfs(char *buf, unsigned long len)
return message;
}

-static int __initdata do_retain_initrd;
+static int __initdata retain_initramfs;

static int __init retain_initrd_param(char *str)
{
if (*str)
return 0;
- do_retain_initrd = 1;
+ retain_initramfs = 1;
return 1;
}
__setup("retain_initrd", retain_initrd_param);
@@ -584,7 +584,7 @@ __setup("retain_initrd", retain_initrd_param);
#ifdef CONFIG_ARCH_HAS_KEEPINITRD
static int __init keepinitrd_setup(char *__unused)
{
- do_retain_initrd = 1;
+ retain_initramfs = 1;
return 1;
}
__setup("keepinitrd", keepinitrd_setup);
@@ -743,9 +743,9 @@ static void __init do_populate_rootfs(void *unused, async_cookie_t cookie)
* If the initrd region is overlapped with crashkernel reserved region,
* free only memory that is not part of crashkernel region.
*/
- if (!do_retain_initrd && virt_external_initramfs_start && !kexec_free_initrd()) {
+ if (!retain_initramfs && virt_external_initramfs_start && !kexec_free_initrd()) {
free_initramfs_mem(virt_external_initramfs_start, virt_external_initramfs_end);
- } else if (do_retain_initrd && virt_external_initramfs_start) {
+ } else if (retain_initramfs && virt_external_initramfs_start) {
bin_attr_initrd.size = virt_external_initramfs_end - virt_external_initramfs_start;
bin_attr_initrd.private = (void *)virt_external_initramfs_start;
if (sysfs_create_bin_file(firmware_kobj, &bin_attr_initrd))
--
2.47.2