x86/platform/uv: Use str_enabled_disabled in uv_nmi_setup_hubless_intr
Subsystems (2)
PATCH 1/1 x86/platform/uv: Use str_enabled_disabled in uv_nmi_setup_hubless_intr
Replace hard-coded strings with the str_enabled_disabled() helper. This unifies the output and helps the linker with deduplication, which can result in a smaller binary. Additionally, silence the following Coccinelle/coccicheck warning reported by string_choices.cocci:
opportunity for str_enabled_disabled(uv_pch_intr_now_enabled)
Signed-off-by Thorsten Blum <[email protected]>
--- arch/x86/platform/uv/uv_nmi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
arch/x86/platform/uv/uv_nmi.c +2 -1
@@ -18,6 +18,7 @@#include <linux/sched/debug.h> #include <linux/slab.h> #include <linux/string.h> +#include <linux/string_choices.h> #include <linux/clocksource.h> #include <asm/apic.h>
@@ -340,7 +341,7 @@ static void uv_nmi_setup_hubless_intr(void) uv_pch_intr_now_enabled ? GPIROUTNMI : 0);nmi_debug ("UV:NMI: GPP_D_0 interrupt %s\n" , - uv_pch_intr_now_enabled ?"enabled" :"disabled" ); +str_enabled_disabled (uv_pch_intr_now_enabled)); } static struct init_nmi {
Signature · 1 line
2.51.0
Quoted 9 lines · Thorsten Blum
Replace hard-coded strings with the
str_enabled_disabled()helper. This unifies the output and helps the linker with deduplication, which can result in a smaller binary. Additionally, silence the following Coccinelle/coccicheck warning reported bystring_choices.cocci:opportunity for
str_enabled_disabled(uv_pch_intr_now_enabled)Signed-off-by Thorsten Blum <[email protected]>---
Reviewed-by Kyle Meyer <[email protected]>
Quoted 27 lines
arch/x86/platform/uv/uv_nmi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)arch/x86/platform/uv/uv_nmi.c +2
-1@@ -18,6 +18,7 @@#include <linux/sched/debug.h> #include <linux/slab.h> #include <linux/string.h> +#include <linux/string_choices.h> #include <linux/clocksource.h> #include <asm/apic.h> @@ -340,7 +341,7 @@ static void uv_nmi_setup_hubless_intr(void) uv_pch_intr_now_enabled ? GPIROUTNMI : 0);nmi_debug ("UV:NMI: GPP_D_0 interrupt %s\n" , - uv_pch_intr_now_enabled ?"enabled" :"disabled" ); +str_enabled_disabled (uv_pch_intr_now_enabled)); } static struct init_nmi {Signature · 1 line
2.51.0