Skip to contentSkip to conversation

x86/apic: Use str_disabled_enabled() helper in print_ipi_mode()

PATCH RESEND Applied Thorsten Blum 2 participants 2 messages Feb 9, 2025 – Feb 21, 2025 x86

lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/1 x86/apic: Use str_disabled_enabled() helper in print_ipi_mode()

Remove hard-coded strings by using the str_disabled_enabled() helper.

---
 arch/x86/kernel/apic/ipi.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/x86/kernel/apic/ipi.c +2 -1
index 5da693d633b7..942168da7195 100644
@@ -3,6 +3,7 @@
 #include <linux/cpumask.h>
 #include <linux/delay.h>
 #include <linux/smp.h>
+#include <linux/string_choices.h>
 
 #include <asm/io_apic.h>
 
@@ -23,7 +24,7 @@ __setup("no_ipi_broadcast=", apic_ipi_shorthand);
 static int __init print_ipi_mode(void)
 {
 	pr_info("IPI shorthand broadcast: %s\n",
-		apic_ipi_shorthand_off ? "disabled" : "enabled");
+		str_disabled_enabled(apic_ipi_shorthand_off));
 	return 0;
 }
 late_initcall(print_ipi_mode);
Signature · 1 line
2.48.1
merge bot Applied
#1 lore raw
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:     0156338a18eba7ee229e59c8928c7056e9753c61
Gitweb:        https://git.kernel.org/tip/0156338a18eba7ee229e59c8928c7056e9753c61
Author:        Thorsten Blum <[email protected]>
AuthorDate:    Sun, 09 Feb 2025 22:03:32 +01:00
Committer:     Ingo Molnar <[email protected]>
CommitterDate: Fri, 21 Feb 2025 16:54:22 +01:00

x86/apic: Use str_disabled_enabled() helper in print_ipi_mode()

Remove hard-coded strings by using the str_disabled_enabled() helper.

No change in functionality intended.

---
 arch/x86/kernel/apic/ipi.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/x86/kernel/apic/ipi.c +2 -1
index 5da693d..942168d 100644
@@ -3,6 +3,7 @@
 #include <linux/cpumask.h>
 #include <linux/delay.h>
 #include <linux/smp.h>
+#include <linux/string_choices.h>
 
 #include <asm/io_apic.h>
 
@@ -23,7 +24,7 @@ __setup("no_ipi_broadcast=", apic_ipi_shorthand);
 static int __init print_ipi_mode(void)
 {
 	pr_info("IPI shorthand broadcast: %s\n",
-		apic_ipi_shorthand_off ? "disabled" : "enabled");
+		str_disabled_enabled(apic_ipi_shorthand_off));
 	return 0;
 }
 late_initcall(print_ipi_mode);