diff options
author | Ethan Carter Edwards <ethan@ethancedwards.com> | 2025-02-20 17:39:40 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2025-03-18 11:04:26 +0100 |
commit | f664a1399633c63706f763d4bb58c96110355330 (patch) | |
tree | 1ea3aebafd84a2aa35b3724299555f98a58f82f4 | |
parent | 0bc754d1e31f40f4a343b692096d9e092ccc0370 (diff) |
um: use str_yes_no() to remove hardcoded "yes" and "no"
Remove hard-coded strings by using the str_yes_no() helper function
provided by <linux/string_choices.h>.
Signed-off-by: Ethan Carter Edwards <ethan@ethancedwards.com>
Link: https://patch.msgid.link/20250220-um_yes_no-v1-1-2a355ed2d225@ethancedwards.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r-- | arch/um/kernel/um_arch.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/um/kernel/um_arch.c b/arch/um/kernel/um_arch.c index 79ea97d4797e..7f050783885a 100644 --- a/arch/um/kernel/um_arch.c +++ b/arch/um/kernel/um_arch.c @@ -12,6 +12,7 @@ #include <linux/panic_notifier.h> #include <linux/seq_file.h> #include <linux/string.h> +#include <linux/string_choices.h> #include <linux/utsname.h> #include <linux/sched.h> #include <linux/sched/task.h> @@ -78,7 +79,7 @@ static int show_cpuinfo(struct seq_file *m, void *v) seq_printf(m, "model name\t: UML\n"); seq_printf(m, "mode\t\t: skas\n"); seq_printf(m, "host\t\t: %s\n", host_info); - seq_printf(m, "fpu\t\t: %s\n", cpu_has(&boot_cpu_data, X86_FEATURE_FPU) ? "yes" : "no"); + seq_printf(m, "fpu\t\t: %s\n", str_yes_no(cpu_has(&boot_cpu_data, X86_FEATURE_FPU))); seq_printf(m, "flags\t\t:"); for (i = 0; i < 32*NCAPINTS; i++) if (cpu_has(&boot_cpu_data, i) && (x86_cap_flags[i] != NULL)) |