Skip to content

Commit c4a0a4a

Browse files
tobluxtsbogend
authored andcommitted
MIPS: kernel: proc: Use str_yes_no() helper function
Remove hard-coded strings by using the str_yes_no() helper function. Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Reviewed-by: Maciej W. Rozycki <macro@orcam.me.uk> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
1 parent 1aa6755 commit c4a0a4a

1 file changed

Lines changed: 8 additions & 9 deletions

File tree

arch/mips/kernel/proc.c

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -66,24 +66,23 @@ static int show_cpuinfo(struct seq_file *m, void *v)
6666
seq_printf(m, "BogoMIPS\t\t: %u.%02u\n",
6767
cpu_data[n].udelay_val / (500000/HZ),
6868
(cpu_data[n].udelay_val / (5000/HZ)) % 100);
69-
seq_printf(m, "wait instruction\t: %s\n", cpu_wait ? "yes" : "no");
69+
seq_printf(m, "wait instruction\t: %s\n", str_yes_no(cpu_wait));
7070
seq_printf(m, "microsecond timers\t: %s\n",
71-
cpu_has_counter ? "yes" : "no");
71+
str_yes_no(cpu_has_counter));
7272
seq_printf(m, "tlb_entries\t\t: %d\n", cpu_data[n].tlbsize);
7373
seq_printf(m, "extra interrupt vector\t: %s\n",
74-
cpu_has_divec ? "yes" : "no");
75-
seq_printf(m, "hardware watchpoint\t: %s",
76-
cpu_has_watch ? "yes, " : "no\n");
74+
str_yes_no(cpu_has_divec));
75+
seq_printf(m, "hardware watchpoint\t: %s", str_yes_no(cpu_has_watch));
7776
if (cpu_has_watch) {
78-
seq_printf(m, "count: %d, address/irw mask: [",
77+
seq_printf(m, ", count: %d, address/irw mask: [",
7978
cpu_data[n].watch_reg_count);
8079
for (i = 0; i < cpu_data[n].watch_reg_count; i++)
8180
seq_printf(m, "%s0x%04x", i ? ", " : "",
8281
cpu_data[n].watch_reg_masks[i]);
83-
seq_puts(m, "]\n");
82+
seq_puts(m, "]");
8483
}
8584

86-
seq_puts(m, "isa\t\t\t:");
85+
seq_puts(m, "\nisa\t\t\t:");
8786
if (cpu_has_mips_1)
8887
seq_puts(m, " mips1");
8988
if (cpu_has_mips_2)
@@ -155,7 +154,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
155154

156155
if (cpu_has_mmips) {
157156
seq_printf(m, "micromips kernel\t: %s\n",
158-
(read_c0_config3() & MIPS_CONF3_ISA_OE) ? "yes" : "no");
157+
str_yes_no(read_c0_config3() & MIPS_CONF3_ISA_OE));
159158
}
160159

161160
seq_puts(m, "Options implemented\t:");

0 commit comments

Comments
 (0)