Skip to content

Commit f1c21cf

Browse files
jognesspmladek
authored andcommitted
printk: Remove redundant deferred check in vprintk()
The helper printk_get_console_flush_type() is already calling is_printk_legacy_deferred() to determine if legacy printing is to be offloaded. Therefore there is no need for vprintk() to perform this check as well. Remove the redundant check from vprintk(). Signed-off-by: John Ogness <john.ogness@linutronix.de> Reviewed-by: Petr Mladek <pmladek@suse.com> Link: https://lore.kernel.org/r/20241209111746.192559-2-john.ogness@linutronix.de Signed-off-by: Petr Mladek <pmladek@suse.com>
1 parent 7d66d3a commit f1c21cf

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

kernel/printk/printk_safe.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -74,15 +74,6 @@ asmlinkage int vprintk(const char *fmt, va_list args)
7474
if (unlikely(kdb_trap_printk && kdb_printf_cpu < 0))
7575
return vkdb_printf(KDB_MSGSRC_PRINTK, fmt, args);
7676
#endif
77-
78-
/*
79-
* Use the main logbuf even in NMI. But avoid calling console
80-
* drivers that might have their own locks.
81-
*/
82-
if (is_printk_legacy_deferred())
83-
return vprintk_deferred(fmt, args);
84-
85-
/* No obstacles. */
8677
return vprintk_default(fmt, args);
8778
}
8879
EXPORT_SYMBOL(vprintk);

0 commit comments

Comments
 (0)