Skip to content

Commit

Permalink
printk: call boot_delay_msec() in printk_delay()
Browse files Browse the repository at this point in the history
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
  • Loading branch information
John Ogness authored and Petr Mladek committed Apr 22, 2022
1 parent 9f0844d commit 1f47e8a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions kernel/printk/printk.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit 1f47e8a

Please sign in to comment.