Skip to content

Commit 7565caa

Browse files
tobluxbp3tk0v
authored andcommitted
x86/cpu: Use str_yes_no() helper in show_cpuinfo_misc()
Remove hard-coded strings by using the str_yes_no() helper function. Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Link: https://lore.kernel.org/r/20241026110808.78074-1-thorsten.blum@linux.dev
1 parent cdccaab commit 7565caa

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

arch/x86/kernel/cpu/proc.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@ static void show_cpuinfo_misc(struct seq_file *m, struct cpuinfo_x86 *c)
4141
"fpu_exception\t: %s\n"
4242
"cpuid level\t: %d\n"
4343
"wp\t\t: yes\n",
44-
boot_cpu_has_bug(X86_BUG_FDIV) ? "yes" : "no",
45-
boot_cpu_has_bug(X86_BUG_F00F) ? "yes" : "no",
46-
boot_cpu_has_bug(X86_BUG_COMA) ? "yes" : "no",
47-
boot_cpu_has(X86_FEATURE_FPU) ? "yes" : "no",
48-
boot_cpu_has(X86_FEATURE_FPU) ? "yes" : "no",
44+
str_yes_no(boot_cpu_has_bug(X86_BUG_FDIV)),
45+
str_yes_no(boot_cpu_has_bug(X86_BUG_F00F)),
46+
str_yes_no(boot_cpu_has_bug(X86_BUG_COMA)),
47+
str_yes_no(boot_cpu_has(X86_FEATURE_FPU)),
48+
str_yes_no(boot_cpu_has(X86_FEATURE_FPU)),
4949
c->cpuid_level);
5050
}
5151
#else

0 commit comments

Comments
 (0)