xics/icp_natives: add __init to marker icp_native_init()
PATCH 1/1 xics/icp_natives: add __init to marker icp_native_init()
This should fix the following warning:
LD arch/powerpc/sysdev/xics/built-in.o
WARNING: arch/powerpc/sysdev/xics/built-in.o(.text+0x1310): Section mismatch in reference from the function .icp_native_init() to the function .init.text:.icp_native_init_one_node()
The function .icp_native_init() references
the function __init .icp_native_init_one_node().
This is often because .icp_native_init lacks a __init
annotation or the annotation of .icp_native_init_one_node is wrong.
icp_native_init() is only referenced in `arch/powerpc/sysdev/xics/xics-common.c' by xics_init() which is itself marked with __init.
= not built-tested =
--- arch/powerpc/sysdev/xics/icp-native.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/powerpc/sysdev/xics/icp-native.c +1 -1
@@ -276,7 +276,7 @@ static const struct icp_ops icp_native_ops = {#endif }; -int icp_native_init (void ) +int __init icp_native_init (void ) {struct device_node *np;u32 indx =0 ;
Signature · 1 line
1.7.6.153.g78432
Quoted 11 lines · Arnaud Lacombe
This should fix the following warning:
LD
arch/powerpc/sysdev/xics/built-in.o
WARNING: arch/powerpc/sysdev/xics/built-in.o(.text+0x1310): Section mismatch in reference from the function .icp_native_init() to the function .init.text:.icp_native_init_one_node()
The function .icp_native_init() references
the function__init.icp_native_init_one_node().
This is often because .icp_native_init lacks a__init
annotation or the annotation of .icp_native_init_one_node is wrong.
Quoted 7 lines
icp_native_init()is only referenced in `arch/powerpc/sysdev/xics/xics-common.c' byxics_init()which is itself marked with__init.= not built-tested =
Reported-by Timur Tabi <[email protected]>Signed-off-by Arnaud Lacombe <[email protected]>
This warning still appears, though:
WARNING: arch/powerpc/sysdev/built-in.o(.text+0xf6b8): Section mismatch in reference from the function .ics_rtas_init() to the function .init.text:.xics_register_ics()
The function .ics_rtas_init() references
the function __init .xics_register_ics().
This is often because .ics_rtas_init lacks a __init
annotation or the annotation of .xics_register_ics is wrong.
To fix this warning, you'll also need:
arch/powerpc/sysdev/xics/ics-rtas.c +1 -1
@@ -213,7 +213,7 @@ static int ics_rtas_host_match(struct ics *ics, struct devicreturn !of_device_is_compatible (node,"chrp,iic" ); } -int ics_rtas_init (void ) +int __init ics_rtas_init (void ) { ibm_get_xive =rtas_token ("ibm,get-xive" ); ibm_set_xive =rtas_token ("ibm,set-xive" );
However, now we get another similar warning:
WARNING: drivers/built-in.o(.text+0x259c484): Section mismatch in reference from the function .tc3589x_keypad_open() to the function .devinit.text:.tc3589x_keypad_init_key_hardware()
The function .tc3589x_keypad_open() references
the function __devinit .tc3589x_keypad_init_key_hardware().
This is often because .tc3589x_keypad_open lacks a __devinit annotation or the annotation of .tc3589x_keypad_init_key_hardware is wrong.
I'm not sure what to do at this point, because I have a suspicion that adding __devinit to tc3589x_keypad_open() is wrong.
Signature · 2 lines
Timur Tabi Linux kernel developer at Freescale
Hi,
Quoted 5 lines · Timur Tabi
Quoted 4 lines · Arnaud Lacombe
This should fix the following warning:
=A0LD =A0 =A0 =A0arch/powerpc/sysdev/xics/built-in.o
WARNING: arch/powerpc/sysdev/xics/built-in.o(.text+0x1310): Section mism=
atch in
Quoted 8 lines
Quoted 8 lines
reference from the function .icp_native_init() to the function .init.text:.icp_native_init_one_node()
The function .icp_native_init() references
the function__init.icp_native_init_one_node().
This is often because .icp_native_init lacks a__initannotation or the annotation of .icp_native_init_one_node is wrong.
icp_native_init()is only referenced in `arch/powerpc/sysdev/xics/xics-c=
ommon.c'
Quoted 4 lines
Quoted 4 lines
by
xics_init()which is itself marked with__init.=3D not built-tested =3D
Quoted 8 lines
Quoted 2 lines
Reported-by Timur Tabi <[email protected]>Signed-off-by Arnaud Lacombe <[email protected]>Acked-by Timur Tabi <[email protected]>This warning still appears, though:
WARNING: arch/powerpc/sysdev/built-in.o(.text+0xf6b8): Section mismatch i=
n
Quoted 7 lines
reference from the function .ics_rtas_init() to the function .init.text:.xics_register_ics()
The function .ics_rtas_init() references
the function__init.xics_register_ics().
This is often because .ics_rtas_init lacks a__initannotation or the annotation of .xics_register_ics is wrong.
he, chain-reaction :)
arch/powerpc/sysdev/xi=
Quoted 3 lines
To fix this warning, you'll also need:
arch/powerpc/sysdev/xi= renamed from arch/powerpc/sysdev/xics/ics-rtas.c +0
-0
cs/ics-
arch/powerpc/sysdev/xics/ics-rtas.c static int ics_rtas_host_match(struct ics *ics, struc=
Quoted 4 lines
index c782f85..a125721 100644
arch/powerpc/sysdev/xics/ics-rtas.c +0
-0@@ -213,7 +213,7 @@ static int ics_rtas_host_match(struct ics *ics, struc=
t devic
Quoted 10 lines
arch/powerpc/sysdev/xics/ics-rtas.c +1
-1=A0 =A0 =A0 =A0return !of_device_is_compatible(node, "chrp,iic"); =A0} -int ics_rtas_init (void ) +int __init ics_rtas_init (void ) =A0{ =A0 =A0 =A0 =A0ibm_get_xive =3D rtas_token("ibm,get-xive"); =A0 =A0 =A0 =A0ibm_set_xive =3D rtas_token("ibm,set-xive");
Quoted 3 lines
However, now we get another similar warning:
WARNING: drivers/built-in.o(.text+0x259c484): Section mismatch in referen=
ce from
Quoted 6 lines
the function .tc3589x_keypad_open() to the function .devinit.text:.tc3589x_keypad_init_key_hardware()
The function .tc3589x_keypad_open() references
the function__devinit.tc3589x_keypad_init_key_hardware(). This is often because .tc3589x_keypad_open lacks a__devinitannotation or the annotation of .tc3589x_keypad_init_key_hardware is wron=
g.
Quoted 2 lines
I'm not sure what to do at this point, because I have a suspicion that ad=
ding
Quoted 2 lines
__devinittotc3589x_keypad_open()is wrong.
tc3589x_keypad_init_key_hardware() annotation looks plain wrong.
- Arnaud
Quoted 5 lines
--
Timur Tabi
Linux kernel developer at Freescale