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 2/2 x86: Fixing improper annotation.

After using __cpuinit in function 'init_thread_xstate(void)', the following warning was generated.

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

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

arch/x86/kernel/xsave.c +2 -2
@@ -301,7 +301,7 @@ void __cpuinit xsave_init(void)
 /*
  * setup the xstate image representing the init state
  */
-static void __init setup_xstate_init(void)
+static void __cpuinit setup_xstate_init(void)
 {
 	init_xstate_buf = alloc_bootmem(xstate_size);
 	init_xstate_buf->i387.mxcsr = MXCSR_DEFAULT;
@@ -310,7 +310,7 @@ static void __init setup_xstate_init(voi
 /*
  * Enable and initialize the xsave feature.
  */
-void __init xsave_cntxt_init(void)
+void __cpuinit xsave_cntxt_init(void)
 {
 	unsigned int eax, ebx, ecx, edx;