From: Marcos Paulo de Souza Date: Fri, 21 Nov 2025 18:50:34 +0000 (-0300) Subject: arch: um: kmsg_dump: Use console_is_usable X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4c70ab110bdd6513f3cac6b9eb01ac3b7f0d23a2;p=thirdparty%2Flinux.git arch: um: kmsg_dump: Use console_is_usable All consoles found on for_each_console are registered, meaning that all of them have the CON_ENABLED flag set. Since NBCON was introduced it's important to check if a given console also implements the NBCON callbacks. The function console_is_usable does exactly that. Signed-off-by: Marcos Paulo de Souza Reviewed-by: Petr Mladek Link: https://patch.msgid.link/20251121-printk-cleanup-part2-v2-2-57b8b78647f4@suse.com Signed-off-by: Petr Mladek --- diff --git a/arch/um/kernel/kmsg_dump.c b/arch/um/kernel/kmsg_dump.c index 4190211752726..fc0f543d1d8e3 100644 --- a/arch/um/kernel/kmsg_dump.c +++ b/arch/um/kernel/kmsg_dump.c @@ -31,7 +31,7 @@ static void kmsg_dumper_stdout(struct kmsg_dumper *dumper, * expected to output the crash information. */ if (strcmp(con->name, "ttynull") != 0 && - (console_srcu_read_flags(con) & CON_ENABLED)) { + console_is_usable(con, console_srcu_read_flags(con), true)) { break; } }