Skip to content

Commit f603143

Browse files
tobluxgeertu
authored andcommitted
m68k: atari: Use str_on_off() helper in atari_nvram_proc_read()
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> Link: https://lore.kernel.org/20241206115634.47332-2-thorsten.blum@linux.dev Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
1 parent e419dde commit f603143

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

arch/m68k/atari/nvram.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616
#include <linux/proc_fs.h>
1717
#include <linux/seq_file.h>
1818
#include <linux/spinlock.h>
19+
#include <linux/string_choices.h>
1920
#include <linux/types.h>
21+
2022
#include <asm/atarihw.h>
2123
#include <asm/atariints.h>
2224

@@ -198,7 +200,7 @@ static void atari_nvram_proc_read(unsigned char *nvram, struct seq_file *seq,
198200
seq_printf(seq, "0x%02x (undefined)\n", nvram[1]);
199201

200202
seq_printf(seq, "SCSI arbitration : %s\n",
201-
(nvram[16] & 0x80) ? "on" : "off");
203+
str_on_off(nvram[16] & 0x80));
202204
seq_puts(seq, "SCSI host ID : ");
203205
if (nvram[16] & 0x80)
204206
seq_printf(seq, "%d\n", nvram[16] & 7);
@@ -236,7 +238,7 @@ static void atari_nvram_proc_read(unsigned char *nvram, struct seq_file *seq,
236238
vmode & 16 ? "VGA" : "TV", vmode & 32 ? "PAL" : "NTSC");
237239
seq_printf(seq,
238240
" %soverscan, compat. mode %s%s\n",
239-
vmode & 64 ? "" : "no ", vmode & 128 ? "on" : "off",
241+
vmode & 64 ? "" : "no ", str_on_off(vmode & 128),
240242
vmode & 256 ?
241243
(vmode & 16 ? ", line doubling" : ", half screen") : "");
242244
}

0 commit comments

Comments
 (0)