linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc: Mark arch_get_ima_policy() and is_ppc_trustedboot_enabled() as __init
@ 2022-04-07 14:15 Michael Ellerman
  2022-04-08 16:05 ` Mimi Zohar
  0 siblings, 1 reply; 6+ messages in thread
From: Michael Ellerman @ 2022-04-07 14:15 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: nayna, zohar, dja

We can mark arch_get_ima_policy() as __init because it's only caller
ima_init_arch_policy() is __init. We can then mark
is_ppc_trustedboot_enabled() __init because its only caller is
arch_get_ima_policy().

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
 arch/powerpc/kernel/ima_arch.c    | 2 +-
 arch/powerpc/kernel/secure_boot.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/kernel/ima_arch.c b/arch/powerpc/kernel/ima_arch.c
index 957abd592075..accd228ddc3d 100644
--- a/arch/powerpc/kernel/ima_arch.c
+++ b/arch/powerpc/kernel/ima_arch.c
@@ -60,7 +60,7 @@ static const char *const secure_and_trusted_rules[] = {
  * Returns the relevant IMA arch-specific policies based on the system secure
  * boot state.
  */
-const char *const *arch_get_ima_policy(void)
+const char *const * __init arch_get_ima_policy(void)
 {
 	if (is_ppc_secureboot_enabled()) {
 		if (IS_ENABLED(CONFIG_MODULE_SIG))
diff --git a/arch/powerpc/kernel/secure_boot.c b/arch/powerpc/kernel/secure_boot.c
index f9af305d9579..0adf0f61d3b2 100644
--- a/arch/powerpc/kernel/secure_boot.c
+++ b/arch/powerpc/kernel/secure_boot.c
@@ -41,7 +41,7 @@ bool is_ppc_secureboot_enabled(void)
 	return enabled;
 }
 
-bool is_ppc_trustedboot_enabled(void)
+bool __init is_ppc_trustedboot_enabled(void)
 {
 	struct device_node *node;
 	bool enabled = false;
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-04-09 13:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-07 14:15 [PATCH] powerpc: Mark arch_get_ima_policy() and is_ppc_trustedboot_enabled() as __init Michael Ellerman
2022-04-08 16:05 ` Mimi Zohar
2022-04-08 17:31   ` Mimi Zohar
2022-04-08 17:46     ` Mimi Zohar
2022-04-09 13:04       ` Michael Ellerman
2022-04-09 13:03   ` Michael Ellerman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).