Skip to contentSkip to conversation

x86: Fixing improper annotation.

PATCH New Rakib Mullick 1 participant 1 message Nov 11, 2008 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 x86: Fixing improper annotation.

The macro __init used in function 'init_thread_xstate' is not appropriate. It should be __cpuinit , because it's been called from __cpuinit functions several times ( I myself found twice, once from 'cpu_init' and other is from 'fpu_init'). Thus produces the following warning:

WARNING: arch/x86/kernel/built-in.o(.cpuinit.text+0x2237): Section mismatch in reference from the function cpu_init() to the function .init.text:init_thread_xstate()
The function __cpuinit cpu_init() references
a function __init init_thread_xstate().
If init_thread_xstate is only used by cpu_init then annotate init_thread_xstate with a matching annotation.

This patch fixes the above warning. If anything else please notice.

arch/x86/kernel/i387.c +1 -1
@@ -58,7 +58,7 @@ void __cpuinit mxcsr_feature_mask_init(v
 	stts();
 }
 
-void __init init_thread_xstate(void)
+void __cpuinit init_thread_xstate(void)
 {
 	if (!HAVE_HWFP) {
 		xstate_size = sizeof(struct i387_soft_struct);