Skip to contentSkip to conversation

drivers: misc: bmp085: remove '__init' from mp085_get_of_properties()

PATCH In review Chen Gang 1 participant 2 messages Sep 2, 2013 Char and misc drivers

lore
Share & tools
lore

Chen Gang

author
#0 lore raw

PATCH 1/1 drivers: misc: bmp085: remove '__init' from mp085_get_of_properties()

bmp085_get_of_properties() is called by bmp085_init_client() which is called by bmp085_probe() which is an EXPORT_SYMBOL_GPL function.

bmp085_probe() is really used as a probe function by another modules (e.g. bmp085-i2c.c, bmp085-spi.c).

Except bmp085_get_of_properties(), all functions have no '__init', so need remove '__init' from bmp085_get_of_properties() too, or at least, it will report related warning:

WARNING: vmlinux.o(.text+0x4c8a07): Section mismatch in reference from the variable .LM171 to the variable .init.text:_bmp085_get_of_properties The function .LM171() references
the variable __init _bmp085_get_of_properties.
This is often because .LM171 lacks a __init
annotation or the annotation of _bmp085_get_of_properties is wrong.

---
 drivers/misc/bmp085.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/misc/bmp085.c +1 -1
index 849e2fe..2704d88 100644
@@ -374,7 +374,7 @@ int bmp085_detect(struct device *dev)
 }
 EXPORT_SYMBOL_GPL(bmp085_detect);
 
-static void __init bmp085_get_of_properties(struct bmp085_data *data)
+static void bmp085_get_of_properties(struct bmp085_data *data)
 {
 #ifdef CONFIG_OF
 	struct device_node *np = data->dev->of_node;
Signature · 1 line
1.7.7.6
author
#1 lore raw

It seems the "./scripts/get_maintainer.pl" is not quite precise, it lead me to send this mail to kernel mailing list, not to drivers related mailing list.

[root@gchenlinux linux-next]# ./scripts/get_maintainer.pl /tmp/0001-drivers-misc-bmp085-remove-__init-from-mp085_get_of_.patch Arnd Bergmann <[email protected]> (supporter:CHAR and MISC DRI...)
Greg Kroah-Hartman <[email protected]> (supporter:CHAR and MISC DRI...) [email protected] (open list)

Thanks.

Quoted 36 lines · Chen Gang

bmp085_get_of_properties() is called by bmp085_init_client() which is called by bmp085_probe() which is an EXPORT_SYMBOL_GPL function.

bmp085_probe() is really used as a probe function by another modules (e.g. bmp085-i2c.c, bmp085-spi.c).

Except bmp085_get_of_properties(), all functions have no '__init', so need remove '__init' from bmp085_get_of_properties() too, or at least, it will report related warning:

WARNING: vmlinux.o(.text+0x4c8a07): Section mismatch in reference from the variable .LM171 to the variable .init.text:_bmp085_get_of_properties The function .LM171() references
the variable __init _bmp085_get_of_properties.
This is often because .LM171 lacks a __init
annotation or the annotation of _bmp085_get_of_properties is wrong.

---
 drivers/misc/bmp085.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/misc/bmp085.c +1 -1
index 849e2fe..2704d88 100644
@@ -374,7 +374,7 @@ int bmp085_detect(struct device *dev)
 }
 EXPORT_SYMBOL_GPL(bmp085_detect);
 
-static void __init bmp085_get_of_properties(struct bmp085_data *data)
+static void bmp085_get_of_properties(struct bmp085_data *data)
 {
 #ifdef CONFIG_OF
 	struct device_node *np = data->dev->of_node;
Signature · 1 line
Chen Gang