Skip to content

Commit 790b2f2

Browse files
tobluxgregkh
authored andcommitted
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 <[email protected]> Reviewed-by: Amit Shah <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 10d43ec commit 790b2f2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/char/virtio_console.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#include <linux/workqueue.h>
2727
#include <linux/module.h>
2828
#include <linux/dma-mapping.h>
29+
#include <linux/string_choices.h>
2930
#include "../tty/hvc/hvc_console.h"
3031

3132
#define is_rproc_enabled IS_ENABLED(CONFIG_REMOTEPROC)
@@ -1269,8 +1270,7 @@ static int port_debugfs_show(struct seq_file *s, void *data)
12691270
seq_printf(s, "bytes_sent: %lu\n", port->stats.bytes_sent);
12701271
seq_printf(s, "bytes_received: %lu\n", port->stats.bytes_received);
12711272
seq_printf(s, "bytes_discarded: %lu\n", port->stats.bytes_discarded);
1272-
seq_printf(s, "is_console: %s\n",
1273-
is_console_port(port) ? "yes" : "no");
1273+
seq_printf(s, "is_console: %s\n", str_yes_no(is_console_port(port)));
12741274
seq_printf(s, "console_vtermno: %u\n", port->cons.vtermno);
12751275

12761276
return 0;

0 commit comments

Comments
 (0)