printk: Remove redundant deferred check in vprintk()
authorJohn Ogness <john.ogness@linutronix.de>
Mon, 9 Dec 2024 11:17:45 +0000 (12:23 +0106)
committerPetr Mladek <pmladek@suse.com>
Mon, 16 Dec 2024 12:26:09 +0000 (13:26 +0100)
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>
kernel/printk/printk_safe.c

index 6f94418d53ffba6b6e7ee8bf645deb5823dcf669..6283bc0b55e6dbdc79a214e7c3eefa4346fe9410 100644 (file)
@@ -74,15 +74,6 @@ asmlinkage int vprintk(const char *fmt, va_list args)
        if (unlikely(kdb_trap_printk && kdb_printf_cpu < 0))
                return vkdb_printf(KDB_MSGSRC_PRINTK, fmt, args);
 #endif
-
-       /*
-        * Use the main logbuf even in NMI. But avoid calling console
-        * drivers that might have their own locks.
-        */
-       if (is_printk_legacy_deferred())
-               return vprintk_deferred(fmt, args);
-
-       /* No obstacles. */
        return vprintk_default(fmt, args);
 }
 EXPORT_SYMBOL(vprintk);