* [PATCH] virtio: console: Use str_yes_no() helper in port_debugfs_show()
@ 2025-02-12 11:48 Thorsten Blum
2025-02-12 12:14 ` Amit Shah
0 siblings, 1 reply; 2+ messages in thread
From: Thorsten Blum @ 2025-02-12 11:48 UTC (permalink / raw)
To: Amit Shah, Arnd Bergmann, Greg Kroah-Hartman
Cc: Thorsten Blum, virtualization, linux-kernel
Remove hard-coded strings by using the str_yes_no() helper function.
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
drivers/char/virtio_console.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
index 24442485e73e..35af0cc11d93 100644
--- a/drivers/char/virtio_console.c
+++ b/drivers/char/virtio_console.c
@@ -26,6 +26,7 @@
#include <linux/workqueue.h>
#include <linux/module.h>
#include <linux/dma-mapping.h>
+#include <linux/string_choices.h>
#include "../tty/hvc/hvc_console.h"
#define is_rproc_enabled IS_ENABLED(CONFIG_REMOTEPROC)
@@ -1269,8 +1270,7 @@ static int port_debugfs_show(struct seq_file *s, void *data)
seq_printf(s, "bytes_sent: %lu\n", port->stats.bytes_sent);
seq_printf(s, "bytes_received: %lu\n", port->stats.bytes_received);
seq_printf(s, "bytes_discarded: %lu\n", port->stats.bytes_discarded);
- seq_printf(s, "is_console: %s\n",
- is_console_port(port) ? "yes" : "no");
+ seq_printf(s, "is_console: %s\n", str_yes_no(is_console_port(port)));
seq_printf(s, "console_vtermno: %u\n", port->cons.vtermno);
return 0;
--
2.48.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] virtio: console: Use str_yes_no() helper in port_debugfs_show()
2025-02-12 11:48 [PATCH] virtio: console: Use str_yes_no() helper in port_debugfs_show() Thorsten Blum
@ 2025-02-12 12:14 ` Amit Shah
0 siblings, 0 replies; 2+ messages in thread
From: Amit Shah @ 2025-02-12 12:14 UTC (permalink / raw)
To: Thorsten Blum, Arnd Bergmann, Greg Kroah-Hartman
Cc: virtualization, linux-kernel
On Wed, 2025-02-12 at 12:48 +0100, Thorsten Blum wrote:
> Remove hard-coded strings by using the str_yes_no() helper function.
>
> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
> ---
> drivers/char/virtio_console.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Reviewed-by: Amit Shah <amit@kernel.org>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-02-12 12:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-12 11:48 [PATCH] virtio: console: Use str_yes_no() helper in port_debugfs_show() Thorsten Blum
2025-02-12 12:14 ` Amit Shah
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.