diff options
author | John Ogness <john.ogness@linutronix.de> | 2022-04-21 23:28:42 +0206 |
---|---|---|
committer | Petr Mladek <pmladek@suse.com> | 2022-04-22 21:30:57 +0200 |
commit | 1f47e8af45fdd754c5538f8aeb7857a6c087fd6a (patch) | |
tree | 0b2cd0a9112aacd8a8f5ad0a87f4b7c934a95a97 /kernel | |
parent | 9f0844de49cf0557d5c359131004acbb179c174e (diff) | |
download | lwn-1f47e8af45fdd754c5538f8aeb7857a6c087fd6a.tar.gz lwn-1f47e8af45fdd754c5538f8aeb7857a6c087fd6a.zip |
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>
Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Signed-off-by: Petr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/20220421212250.565456-8-john.ogness@linutronix.de
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/printk/printk.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index 82ad3d3d0d4a..2f99e0b383b9 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c @@ -2048,8 +2048,10 @@ static u8 *__printk_recursion_counter(void) 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; @@ -2274,8 +2276,7 @@ asmlinkage int vprintk_emit(int facility, int level, in_sched = true; } - boot_delay_msec(level); - printk_delay(); + printk_delay(level); printed_len = vprintk_store(facility, level, dev_info, fmt, args); |