Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

virtio: console: Use str_yes_no() helper in port_debugfs_show()

Remove hard-coded strings by using the str_yes_no() helper function.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Reviewed-by: Amit Shah <amit@kernel.org>
Link: https://lore.kernel.org/r/20250212114841.74650-2-thorsten.blum@linux.dev
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Thorsten Blum and committed by
Greg Kroah-Hartman
790b2f24 10d43ecb

+2 -2
+2 -2
drivers/char/virtio_console.c
··· 26 26 #include <linux/workqueue.h> 27 27 #include <linux/module.h> 28 28 #include <linux/dma-mapping.h> 29 + #include <linux/string_choices.h> 29 30 #include "../tty/hvc/hvc_console.h" 30 31 31 32 #define is_rproc_enabled IS_ENABLED(CONFIG_REMOTEPROC) ··· 1270 1269 seq_printf(s, "bytes_sent: %lu\n", port->stats.bytes_sent); 1271 1270 seq_printf(s, "bytes_received: %lu\n", port->stats.bytes_received); 1272 1271 seq_printf(s, "bytes_discarded: %lu\n", port->stats.bytes_discarded); 1273 - seq_printf(s, "is_console: %s\n", 1274 - is_console_port(port) ? "yes" : "no"); 1272 + seq_printf(s, "is_console: %s\n", str_yes_no(is_console_port(port))); 1275 1273 seq_printf(s, "console_vtermno: %u\n", port->cons.vtermno); 1276 1274 1277 1275 return 0;