[PATCH] x86/early_printk: Use bool for the keep flag
From: Thorsten Blum
Date: Thu Oct 08 2026 - 06:04:36 EST
The keep flag is only used as a boolean. Change its type to bool. Use
pr_crit() instead of printk(KERN_CRIT) while at it.
No functional change.
Signed-off-by: Thorsten Blum <blum@xxxxxxxxxx>
---
arch/x86/kernel/early_printk.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/arch/x86/kernel/early_printk.c b/arch/x86/kernel/early_printk.c
index cba75306e5b6..28e4ed9de17f 100644
--- a/arch/x86/kernel/early_printk.c
+++ b/arch/x86/kernel/early_printk.c
@@ -370,11 +370,10 @@ static struct console early_serial_console = {
.index = -1,
};
-static void early_console_register(struct console *con, int keep_early)
+static void early_console_register(struct console *con, bool keep_early)
{
if (con->index != -1) {
- printk(KERN_CRIT "ERROR: earlyprintk= %s already used\n",
- con->name);
+ pr_crit("ERROR: earlyprintk= %s already used\n", con->name);
return;
}
early_console = con;
@@ -387,7 +386,7 @@ static void early_console_register(struct console *con, int keep_early)
static int __init setup_early_printk(char *buf)
{
- int keep;
+ bool keep;
if (!buf)
return 0;