]> Git Repo - J-linux.git/commitdiff
x86/cpu: Use str_yes_no() helper in show_cpuinfo_misc()
authorThorsten Blum <[email protected]>
Sat, 26 Oct 2024 11:08:06 +0000 (13:08 +0200)
committerBorislav Petkov (AMD) <[email protected]>
Sat, 26 Oct 2024 13:37:15 +0000 (15:37 +0200)
Remove hard-coded strings by using the str_yes_no() helper function.

Signed-off-by: Thorsten Blum <[email protected]>
Signed-off-by: Borislav Petkov (AMD) <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
arch/x86/kernel/cpu/proc.c

index e65fae63660e3f1c50922e918ac99caa1adbac10..41ed01f46bd92da5e04f2c14312f24497847bcb0 100644 (file)
@@ -41,11 +41,11 @@ static void show_cpuinfo_misc(struct seq_file *m, struct cpuinfo_x86 *c)
                   "fpu_exception\t: %s\n"
                   "cpuid level\t: %d\n"
                   "wp\t\t: yes\n",
-                  boot_cpu_has_bug(X86_BUG_FDIV) ? "yes" : "no",
-                  boot_cpu_has_bug(X86_BUG_F00F) ? "yes" : "no",
-                  boot_cpu_has_bug(X86_BUG_COMA) ? "yes" : "no",
-                  boot_cpu_has(X86_FEATURE_FPU) ? "yes" : "no",
-                  boot_cpu_has(X86_FEATURE_FPU) ? "yes" : "no",
+                  str_yes_no(boot_cpu_has_bug(X86_BUG_FDIV)),
+                  str_yes_no(boot_cpu_has_bug(X86_BUG_F00F)),
+                  str_yes_no(boot_cpu_has_bug(X86_BUG_COMA)),
+                  str_yes_no(boot_cpu_has(X86_FEATURE_FPU)),
+                  str_yes_no(boot_cpu_has(X86_FEATURE_FPU)),
                   c->cpuid_level);
 }
 #else
This page took 0.043632 seconds and 4 git commands to generate.