[PATCH] ARM: at91: pm: Mark at91_pm_secure_init as __init

Fabio Estevam festevam at gmail.com
Wed Jun 22 04:48:10 PDT 2022


From: Fabio Estevam <festevam at denx.de>

at91_pm_secure_init() is used inside sama5d2_pm_init(), which has
the __init notation.

Pass the __init notation to at91_pm_secure_init() as well to fix the
following section mismatch warning:

WARNING: modpost: vmlinux.o(.text.unlikely+0x2138): Section mismatch in reference from the function at91_pm_secure_init() to the (unknown reference) .init.rodata:(unknown)

Fixes: f2f5cf78a333 ("ARM: at91: pm: add support for sama5d2 secure suspend")
Signed-off-by: Fabio Estevam <festevam at denx.de>
---
 arch/arm/mach-at91/pm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c
index b1a43d7bc56c..08eaaca2a078 100644
--- a/arch/arm/mach-at91/pm.c
+++ b/arch/arm/mach-at91/pm.c
@@ -1079,7 +1079,7 @@ static int __init at91_pm_backup_init(void)
 	return ret;
 }
 
-static void at91_pm_secure_init(void)
+static void __init at91_pm_secure_init(void)
 {
 	int suspend_mode;
 	struct arm_smccc_res res;
-- 
2.25.1




More information about the linux-arm-kernel mailing list