]> Git Repo - J-linux.git/commitdiff
microblaze: mb: Use str_yes_no() helper in show_cpuinfo()
authorThorsten Blum <[email protected]>
Thu, 14 Nov 2024 22:46:49 +0000 (23:46 +0100)
committerMichal Simek <[email protected]>
Fri, 15 Nov 2024 09:27:48 +0000 (10:27 +0100)
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]>
arch/microblaze/kernel/cpu/mb.c

index 9581d194d9e479afbe1147ee2fc2f23f7f93acce..37cb2898216bbd20712fa2c311bb7afae57e9477 100644 (file)
@@ -66,10 +66,10 @@ static int show_cpuinfo(struct seq_file *m, void *v)
                   " MSR:\t\t%s\n"
                   " PCMP:\t\t%s\n"
                   " DIV:\t\t%s\n",
-                  (cpuinfo.use_instr & PVR0_USE_BARREL_MASK) ? "yes" : "no",
-                  (cpuinfo.use_instr & PVR2_USE_MSR_INSTR) ? "yes" : "no",
-                  (cpuinfo.use_instr & PVR2_USE_PCMP_INSTR) ? "yes" : "no",
-                  (cpuinfo.use_instr & PVR0_USE_DIV_MASK) ? "yes" : "no");
+                  str_yes_no(cpuinfo.use_instr & PVR0_USE_BARREL_MASK),
+                  str_yes_no(cpuinfo.use_instr & PVR2_USE_MSR_INSTR),
+                  str_yes_no(cpuinfo.use_instr & PVR2_USE_PCMP_INSTR),
+                  str_yes_no(cpuinfo.use_instr & PVR0_USE_DIV_MASK));
 
        seq_printf(m, " MMU:\t\t%x\n", cpuinfo.mmu);
 
@@ -120,7 +120,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
 
        seq_printf(m,
                   "HW-Debug:\t%s\n",
-                  cpuinfo.hw_debug ? "yes" : "no");
+                  str_yes_no(cpuinfo.hw_debug));
 
        seq_printf(m,
                   "PVR-USR1:\t%02x\n"
This page took 0.055719 seconds and 4 git commands to generate.