Skip to contentSkip to conversation

x86: Fix setion mismatch warning.

PATCH Applied Rakib Mullick 2 participants 2 messages Jan 23, 2009 – Jan 26, 2009 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86: Fix setion mismatch warning.

Impact: Fix section mismatch warning.

Here function vmi_activate calls a init function activate_vmi , which causes the following section mismatch warnings. This patch fixes it.

LD arch/x86/kernel/built-in.o
WARNING: arch/x86/kernel/built-in.o(.text+0x13ba9): Section mismatch in reference from the function vmi_activate() to the function .init.text:vmi_time_init()
The function vmi_activate() references
the function __init vmi_time_init().
This is often because vmi_activate lacks a __init annotation or the annotation of vmi_time_init is wrong.

WARNING: arch/x86/kernel/built-in.o(.text+0x13bd1): Section mismatch in reference from the function vmi_activate() to the function .devinit.text:vmi_time_bsp_init()
The function vmi_activate() references
the function __devinit vmi_time_bsp_init().
This is often because vmi_activate lacks a __devinit annotation or the annotation of vmi_time_bsp_init is wrong.

WARNING: arch/x86/kernel/built-in.o(.text+0x13bdb): Section mismatch in reference from the function vmi_activate() to the function .devinit.text:vmi_time_ap_init()
The function vmi_activate() references
the function __devinit vmi_time_ap_init().
This is often because vmi_activate lacks a __devinit annotation or the annotation of vmi_time_ap_init is wrong.

Thanks.

arch/x86/kernel/vmi_32.c +1 -1
@@ -858,7 +858,7 @@ void __init vmi_init(void)
 #endif
 }
 
-void vmi_activate(void)
+void __init vmi_activate(void)
 {
 	unsigned long flags;
Applied
#1 lore raw
Quoted 31 lines · Rakib Mullick

Impact: Fix section mismatch warning.

Here function vmi_activate calls a init function activate_vmi , which causes the following section mismatch warnings. This patch fixes it.

LD arch/x86/kernel/built-in.o
WARNING: arch/x86/kernel/built-in.o(.text+0x13ba9): Section mismatch in reference from the function vmi_activate() to the function .init.text:vmi_time_init()
The function vmi_activate() references
the function __init vmi_time_init().
This is often because vmi_activate lacks a __init annotation or the annotation of vmi_time_init is wrong.

WARNING: arch/x86/kernel/built-in.o(.text+0x13bd1): Section mismatch in reference from the function vmi_activate() to the function .devinit.text:vmi_time_bsp_init()
The function vmi_activate() references
the function __devinit vmi_time_bsp_init().
This is often because vmi_activate lacks a __devinit annotation or the annotation of vmi_time_bsp_init is wrong.

WARNING: arch/x86/kernel/built-in.o(.text+0x13bdb): Section mismatch in reference from the function vmi_activate() to the function .devinit.text:vmi_time_ap_init()
The function vmi_activate() references
the function __devinit vmi_time_ap_init().
This is often because vmi_activate lacks a __devinit annotation or the annotation of vmi_time_ap_init is wrong.

Quoted 3 lines

Thanks.

applied to tip/x86/urgent, thanks Rakib.

Note, the patch was corrupted here:

arch/x86/kernel/vmi_32.c void __init vmi_init(void)

Quoted 4 lines
arch/x86/kernel/vmi_32.c +1 -1
+void __init vmi_activate(void)
 {
 	unsigned long flags;
--

that's too short - context diffs have 3 closing lines. I fixed this up manually.

I also fixed the typo in the subject line.

Thanks,

Ingo