From 36a3108df828005c16b22116ff94e67dfc038a30 Mon Sep 17 00:00:00 2001
From: John Ogness <john.ogness@linutronix.de>
Date: Mon, 30 Nov 2020 01:42:04 +0106
Subject: [PATCH 009/158] printk: call boot_delay_msec() in printk_delay()

boot_delay_msec() is always called immediately before printk_delay()
so just call it from within printk_delay().

Signed-off-by: John Ogness <john.ogness@linutronix.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 kernel/printk/printk.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

Index: linux-5.15.19-rt29/kernel/printk/printk.c
===================================================================
@ linux-5.15.19-rt29/kernel/printk/printk.c:1753 @ SYSCALL_DEFINE3(syslog, int, type, char
 
 int printk_delay_msec __read_mostly;
 
-static inline void printk_delay(void)
+static inline void printk_delay(int level)
 {
+	boot_delay_msec(level);
+
 	if (unlikely(printk_delay_msec)) {
 		int m = printk_delay_msec;
 
@ linux-5.15.19-rt29/kernel/printk/printk.c:2228 @ asmlinkage int vprintk_emit(int facility
 		in_sched = true;
 	}
 
-	boot_delay_msec(level);
-	printk_delay();
+	printk_delay(level);
 
 	printed_len = vprintk_store(facility, level, dev_info, fmt, args);