Skip to content

Commit eb01f8f

Browse files
tobluxmichalsimek
authored andcommitted
microblaze: mb: Use str_yes_no() helper in show_cpuinfo()
Remove hard-coded strings by using the str_yes_no() helper function. Signed-off-by: Thorsten Blum <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Michal Simek <[email protected]>
1 parent 01a9664 commit eb01f8f

File tree

1 file changed

+5
-5
lines changed
  • arch/microblaze/kernel/cpu

1 file changed

+5
-5
lines changed

arch/microblaze/kernel/cpu/mb.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,10 @@ static int show_cpuinfo(struct seq_file *m, void *v)
6666
" MSR:\t\t%s\n"
6767
" PCMP:\t\t%s\n"
6868
" DIV:\t\t%s\n",
69-
(cpuinfo.use_instr & PVR0_USE_BARREL_MASK) ? "yes" : "no",
70-
(cpuinfo.use_instr & PVR2_USE_MSR_INSTR) ? "yes" : "no",
71-
(cpuinfo.use_instr & PVR2_USE_PCMP_INSTR) ? "yes" : "no",
72-
(cpuinfo.use_instr & PVR0_USE_DIV_MASK) ? "yes" : "no");
69+
str_yes_no(cpuinfo.use_instr & PVR0_USE_BARREL_MASK),
70+
str_yes_no(cpuinfo.use_instr & PVR2_USE_MSR_INSTR),
71+
str_yes_no(cpuinfo.use_instr & PVR2_USE_PCMP_INSTR),
72+
str_yes_no(cpuinfo.use_instr & PVR0_USE_DIV_MASK));
7373

7474
seq_printf(m, " MMU:\t\t%x\n", cpuinfo.mmu);
7575

@@ -120,7 +120,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
120120

121121
seq_printf(m,
122122
"HW-Debug:\t%s\n",
123-
cpuinfo.hw_debug ? "yes" : "no");
123+
str_yes_no(cpuinfo.hw_debug));
124124

125125
seq_printf(m,
126126
"PVR-USR1:\t%02x\n"

0 commit comments

Comments
 (0)