Skip to contentSkip to conversation

target: Add __init/__exit annotation for target_core_init_configfs/target_core_exit_configfs

PATCH In review Axel Lin 2 participants 2 messages Mar 7, 2011

Subsystems (2)
lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 target: Add __init/__exit annotation for target_core_init_configfs/target_core_exit_configfs

This patch fixes below section mismatch warning.
WARNING: vmlinux.o(.text+0x21617a): Section mismatch in reference from the function target_core_init_configfs() to the function .init.text:rd_module_init() The function target_core_init_configfs() references
the function __init rd_module_init().
This is often because target_core_init_configfs lacks a __init
annotation or the annotation of rd_module_init is wrong.

---
 drivers/target/target_core_configfs.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/target/target_core_configfs.c +2 -2
index caf8dc1..378835e 100644
@@ -3044,7 +3044,7 @@ static struct config_item_type target_core_cit = {
 
 /* Stop functions for struct config_item_type target_core_hba_cit */
 
-static int target_core_init_configfs(void)
+static int __init target_core_init_configfs(void)
 {
 	struct config_group *target_cg, *hba_cg = NULL, *alua_cg = NULL;
 	struct config_group *lu_gp_cg = NULL;
@@ -3176,7 +3176,7 @@ out_global:
 	return -1;
 }
 
-static void target_core_exit_configfs(void)
+static void __exit target_core_exit_configfs(void)
 {
 	struct configfs_subsystem *subsys;
 	struct config_group *hba_cg, *alua_cg, *lu_gp_cg;
Signature · 1 line
1.7.2
#1 lore raw
Quoted 7 lines · Axel Lin

This patch fixes below section mismatch warning.
WARNING: vmlinux.o(.text+0x21617a): Section mismatch in reference from the function target_core_init_configfs() to the function .init.text:rd_module_init() The function target_core_init_configfs() references
the function __init rd_module_init().
This is often because target_core_init_configfs lacks a __init
annotation or the annotation of rd_module_init is wrong.

Quoted 5 lines
---
 drivers/target/target_core_configfs.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Hi Axel,

I have committed this patch with a few minor commit-log cleanups into lio-core-2.6.git/lio-4.1 here:

Created commit dbb7295:: target: Add __init/__exit annotation for target_core_[init,exit]_configfs

 1 files changed, 2 insertions(+), 2 deletions(-)

This will get cherry-picked into lio v4.0 branches shortly, and I will queue up as a for-39 mainline fix.

Thanks for your patch!

--nab

Quoted 22 lines
drivers/target/target_core_configfs.c +2 -2
index caf8dc1..378835e 100644
@@ -3044,7 +3044,7 @@ static struct config_item_type target_core_cit = {
 
 /* Stop functions for struct config_item_type target_core_hba_cit */
 
-static int target_core_init_configfs(void)
+static int __init target_core_init_configfs(void)
 {
 	struct config_group *target_cg, *hba_cg = NULL, *alua_cg = NULL;
 	struct config_group *lu_gp_cg = NULL;
@@ -3176,7 +3176,7 @@ out_global:
 	return -1;
 }
 
-static void target_core_exit_configfs(void)
+static void __exit target_core_exit_configfs(void)
 {
 	struct configfs_subsystem *subsys;
 	struct config_group *hba_cg, *alua_cg, *lu_gp_cg;