x86/cpu: Use str_yes_no() helper in show_cpuinfo_misc()
PATCH 1/1 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 <[email protected]>
--- arch/x86/kernel/cpu/proc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
arch/x86/kernel/cpu/proc.c +5 -5
@@ -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
Signature · 1 line
2.47.0
The following commit has been merged into the x86/cleanups branch of tip:
The following commit has been merged into the x86/cleanups branch of tip:
Commit-ID: 7565caab47e89e9681a2c4439100e78f520833fa Gitweb: https://git.kernel.org/tip/7565caab47e89e9681a2c4439100e78f520833fa Author: Thorsten Blum <[email protected]> AuthorDate: Sat, 26 Oct 2024 13:08:06 +02:00 Committer: Borislav Petkov (AMD) <[email protected]> CommitterDate: Sat, 26 Oct 2024 15:37:15 +02:00
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 <[email protected]>
Signed-off-by Borislav Petkov (AMD) <[email protected]>
--- arch/x86/kernel/cpu/proc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
arch/x86/kernel/cpu/proc.c +5 -5
@@ -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