public inbox for linux-m68k@lists.linux-m68k.org
 help / color / mirror / Atom feed
* [PATCH] m68k/atari: Use str_on_off() helper in atari_nvram_proc_read()
@ 2024-12-06 11:56 Thorsten Blum
  2025-01-08  8:42 ` Geert Uytterhoeven
  0 siblings, 1 reply; 2+ messages in thread
From: Thorsten Blum @ 2024-12-06 11:56 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: Thorsten Blum, linux-m68k, linux-kernel

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

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
 arch/m68k/atari/nvram.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/m68k/atari/nvram.c b/arch/m68k/atari/nvram.c
index 7000d2443aa3..da490392e994 100644
--- a/arch/m68k/atari/nvram.c
+++ b/arch/m68k/atari/nvram.c
@@ -198,7 +198,7 @@ static void atari_nvram_proc_read(unsigned char *nvram, struct seq_file *seq,
 		seq_printf(seq, "0x%02x (undefined)\n", nvram[1]);
 
 	seq_printf(seq, "SCSI arbitration : %s\n",
-		   (nvram[16] & 0x80) ? "on" : "off");
+		   str_on_off(nvram[16] & 0x80));
 	seq_puts(seq, "SCSI host ID     : ");
 	if (nvram[16] & 0x80)
 		seq_printf(seq, "%d\n", nvram[16] & 7);
@@ -236,7 +236,7 @@ static void atari_nvram_proc_read(unsigned char *nvram, struct seq_file *seq,
 		   vmode & 16 ? "VGA" : "TV", vmode & 32 ? "PAL" : "NTSC");
 	seq_printf(seq,
 		   "                   %soverscan, compat. mode %s%s\n",
-		   vmode & 64 ? "" : "no ", vmode & 128 ? "on" : "off",
+		   vmode & 64 ? "" : "no ", str_on_off(vmode & 128),
 		   vmode & 256 ?
 		   (vmode & 16 ? ", line doubling" : ", half screen") : "");
 }
-- 
2.47.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] m68k/atari: Use str_on_off() helper in atari_nvram_proc_read()
  2024-12-06 11:56 [PATCH] m68k/atari: Use str_on_off() helper in atari_nvram_proc_read() Thorsten Blum
@ 2025-01-08  8:42 ` Geert Uytterhoeven
  0 siblings, 0 replies; 2+ messages in thread
From: Geert Uytterhoeven @ 2025-01-08  8:42 UTC (permalink / raw)
  To: Thorsten Blum; +Cc: linux-m68k, linux-kernel

On Fri, Dec 6, 2024 at 12:57 PM Thorsten Blum <thorsten.blum@linux.dev> wrote:
> Remove hard-coded strings by using the str_on_off() helper function.
>
> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>

Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
i.e. will queue in the m68k tree for v6.14.

I am adding

    #include <linux/string_choices.h>

while applying, as currently this relies on lots of implicit includes:

    arch/m68k/atari/nvram.c:#include <linux/seq_file.h>
    include/linux/seq_file.h:#include <linux/string_helpers.h>
    include/linux/string_helpers.h:#include <linux/string_choices.h>
    include/linux/string_choices.h:static inline const char *str_on_off(bool v)

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-01-08  8:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-06 11:56 [PATCH] m68k/atari: Use str_on_off() helper in atari_nvram_proc_read() Thorsten Blum
2025-01-08  8:42 ` Geert Uytterhoeven

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox