Skip to contentSkip to conversation

x86/early_printk: Use bool for the keep flag

PATCH New Thorsten Blum 1 participant 1 message Oct 8 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/early_printk: Use bool for the keep flag

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.

---
 arch/x86/kernel/early_printk.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
arch/x86/kernel/early_printk.c +3 -4
index cba75306e5b6..28e4ed9de17f 100644
@@ -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;