Skip to contentSkip to conversation

KVM: arm64: vgic: Use str_enabled_disabled() in vgic_v3_probe()

PATCH Applied Thorsten Blum 3 participants 3 messages Jan 10, 2025 – Jan 11, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 KVM: arm64: vgic: Use str_enabled_disabled() in vgic_v3_probe()

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

---
 arch/arm64/kvm/vgic/vgic-v3.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
arch/arm64/kvm/vgic/vgic-v3.c +3 -2
index f267bc2486a1..528ee93fefd4 100644
@@ -6,6 +6,7 @@
 #include <linux/kstrtox.h>
 #include <linux/kvm.h>
 #include <linux/kvm_host.h>
+#include <linux/string_choices.h>
 #include <kvm/arm_vgic.h>
 #include <asm/kvm_hyp.h>
 #include <asm/kvm_mmu.h>
@@ -663,9 +664,9 @@ int vgic_v3_probe(const struct gic_kvm_info *info)
 	if (info->has_v4) {
 		kvm_vgic_global_state.has_gicv4 = gicv4_enable;
 		kvm_vgic_global_state.has_gicv4_1 = info->has_v4_1 && gicv4_enable;
-		kvm_info("GICv4%s support %sabled\n",
+		kvm_info("GICv4%s support %s\n",
 			 kvm_vgic_global_state.has_gicv4_1 ? ".1" : "",
-			 gicv4_enable ? "en" : "dis");
+			 str_enabled_disabled(gicv4_enable));
 	}
 
 	kvm_vgic_global_state.vcpu_base = 0;
Signature · 1 line
2.47.1
maintainer Applied
#2 lore raw
In reply to Thorsten Blum
Quoted 4 lines · Thorsten Blum

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

Applied to next, thanks!

[1/1] KVM: arm64: vgic: Use str_enabled_disabled() in vgic_v3_probe()

      commit: dea8838128c580cc6b563c901576b580f93a703e

Cheers,

	M.
Signature · 1 line
Without deviation from the norm, progress is not possible.