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>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
  • Loading branch information
jogness authored and Sebastian Andrzej Siewior committed Sep 13, 2021
1 parent 5317b1a commit 9f40783
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 @@ -1750,8 +1750,10 @@ SYSCALL_DEFINE3(syslog, int, type, char __user *, buf, int, len)

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 @@ -2223,8 +2225,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 9f40783

Please sign in to comment.