]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
powerpc: Use str_enabled_disabled() helper function
authorThorsten Blum <thorsten.blum@linux.dev>
Sun, 27 Oct 2024 22:22:17 +0000 (23:22 +0100)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 5 Nov 2024 09:48:20 +0000 (20:48 +1100)
Remove hard-coded strings by using the str_enabled_disabled() helper
function.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Reviewed-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://patch.msgid.link/20241027222219.1173-2-thorsten.blum@linux.dev
arch/powerpc/kernel/secure_boot.c

index 9e0efb657f3937a3550d7625ba8558e49cdc8a07..3a28795b4ed82e9d05b5b804e3f93c53c03cc44a 100644 (file)
@@ -5,6 +5,7 @@
  */
 #include <linux/types.h>
 #include <linux/of.h>
+#include <linux/string_choices.h>
 #include <asm/secure_boot.h>
 
 static struct device_node *get_ppc_fw_sb_node(void)
@@ -38,7 +39,7 @@ bool is_ppc_secureboot_enabled(void)
        of_node_put(node);
 
 out:
-       pr_info("Secure boot mode %s\n", enabled ? "enabled" : "disabled");
+       pr_info("Secure boot mode %s\n", str_enabled_disabled(enabled));
 
        return enabled;
 }
@@ -62,7 +63,7 @@ bool is_ppc_trustedboot_enabled(void)
        of_node_put(node);
 
 out:
-       pr_info("Trusted boot mode %s\n", enabled ? "enabled" : "disabled");
+       pr_info("Trusted boot mode %s\n", str_enabled_disabled(enabled));
 
        return enabled;
 }