Skip to contentSkip to conversation

optee: Add __init/__exit annotations to module init/exit funcs

PATCH In review Xiu Jianfeng 3 participants 3 messages Sep 24, 2022 – Oct 11, 2022

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

PATCH 1/1 optee: Add __init/__exit annotations to module init/exit funcs

Add missing __init/__exit annotations to module init/exit funcs.

---
 drivers/tee/optee/core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/tee/optee/core.c +2 -2
index daf07737c4fd..2a258bd3b6b5 100644
@@ -188,7 +188,7 @@ void optee_remove_common(struct optee *optee)
 static int smc_abi_rc;
 static int ffa_abi_rc;
 
-static int optee_core_init(void)
+static int __init optee_core_init(void)
 {
 	/*
 	 * The kernel may have crashed at the same time that all available
@@ -210,7 +210,7 @@ static int optee_core_init(void)
 }
 module_init(optee_core_init);
 
-static void optee_core_exit(void)
+static void __exit optee_core_exit(void)
 {
 	if (!smc_abi_rc)
 		optee_smc_abi_unregister();
Signature · 1 line
2.17.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Xiu Jianfeng

Add missing __init/__exit annotations to module init/exit funcs.

---
 drivers/tee/optee/core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

-Sumit

Quoted 25 lines
drivers/tee/optee/core.c +2 -3
index daf07737c4fd..2a258bd3b6b5 100644
@@ -188,7 +188,7 @@ void optee_remove_common(struct optee *optee)
 static int smc_abi_rc;
 static int ffa_abi_rc;
 
-static int optee_core_init(void)
+static int __init optee_core_init(void)
 {
        /*
         * The kernel may have crashed at the same time that all available
@@ -210,7 +210,7 @@ static int optee_core_init(void)
 }
 module_init(optee_core_init);
 
-static void optee_core_exit(void)
+static void __exit optee_core_exit(void)
 {
        if (!smc_abi_rc)
                optee_smc_abi_unregister();
--

2.17.1

#2 lore raw
Quoted 5 lines · Sumit Garg
Quoted 3 lines · Xiu Jianfeng

Add missing __init/__exit annotations to module init/exit funcs.

Quoted 7 lines
Quoted 5 lines
---
 drivers/tee/optee/core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

I'm picking up this.

Thanks,
Jens

Quoted 28 lines

-Sumit

Quoted 25 lines
drivers/tee/optee/core.c +2 -3
index daf07737c4fd..2a258bd3b6b5 100644
@@ -188,7 +188,7 @@ void optee_remove_common(struct optee *optee)
 static int smc_abi_rc;
 static int ffa_abi_rc;
 
-static int optee_core_init(void)
+static int __init optee_core_init(void)
 {
        /*
         * The kernel may have crashed at the same time that all available
@@ -210,7 +210,7 @@ static int optee_core_init(void)
 }
 module_init(optee_core_init);
 
-static void optee_core_exit(void)
+static void __exit optee_core_exit(void)
 {
        if (!smc_abi_rc)
                optee_smc_abi_unregister();
--

2.17.1