[PATCH RESEND 39/62] init: make console_on_rootfs static

Askar Safin
2025-09-14T03:51:09Z

This is cleanup after initrd removal

Signed-off-by: Askar Safin <safinaskar@gmail.com>
---
include/linux/initrd.h | 2 --
init/main.c | 2 +-
2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/include/linux/initrd.h b/include/linux/initrd.h
index 364b603215ac..55239701c4e0 100644
--- a/include/linux/initrd.h
+++ b/include/linux/initrd.h
@@ -23,6 +23,4 @@ extern unsigned long phys_external_initramfs_size;
extern char __builtin_initramfs_start[];
extern unsigned long __builtin_initramfs_size;

-void console_on_rootfs(void);
-
#endif /* __LINUX_INITRD_H */
diff --git a/init/main.c b/init/main.c
index 58a7199c81f7..f119460bf8e1 100644
--- a/init/main.c
+++ b/init/main.c
@@ -1533,7 +1533,7 @@ static int __ref kernel_init(void *unused)
}

/* Open /dev/console, for stdin/stdout/stderr, this should never fail */
-void __init console_on_rootfs(void)
+static void __init console_on_rootfs(void)
{
struct file *file = filp_open("/dev/console", O_RDWR, 0);

--
2.47.2