Skip to content

Commit f664a13

Browse files
ethancedwards8jmberg-intel
authored andcommitted
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>
1 parent 0bc754d commit f664a13

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

arch/um/kernel/um_arch.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include <linux/panic_notifier.h>
1313
#include <linux/seq_file.h>
1414
#include <linux/string.h>
15+
#include <linux/string_choices.h>
1516
#include <linux/utsname.h>
1617
#include <linux/sched.h>
1718
#include <linux/sched/task.h>
@@ -78,7 +79,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
7879
seq_printf(m, "model name\t: UML\n");
7980
seq_printf(m, "mode\t\t: skas\n");
8081
seq_printf(m, "host\t\t: %s\n", host_info);
81-
seq_printf(m, "fpu\t\t: %s\n", cpu_has(&boot_cpu_data, X86_FEATURE_FPU) ? "yes" : "no");
82+
seq_printf(m, "fpu\t\t: %s\n", str_yes_no(cpu_has(&boot_cpu_data, X86_FEATURE_FPU)));
8283
seq_printf(m, "flags\t\t:");
8384
for (i = 0; i < 32*NCAPINTS; i++)
8485
if (cpu_has(&boot_cpu_data, i) && (x86_cap_flags[i] != NULL))

0 commit comments

Comments
 (0)