[PATCH] microcode: fix section mismatch warning

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Sam Ravnborg
Date: Thursday, May 31, 2007 - 1:51 pm

Fix the following section mismatch warnings in microcode.c:
WARNING: arch/i386/kernel/built-in.o(.init.text+0x3966): Section mismatch: reference to .exit.text: (between 'microcode_init' and 'parse_maxcpus')
WARNING: arch/i386/kernel/built-in.o(.init.text+0x3992): Section mismatch: reference to .exit.text: (between 'microcode_init' and 'parse_maxcpus')

The warning are caused by a function marked __init that
calls a function marked __exit.
Functions marked __exit may be discarded either during link or run-time
and thus the reference is not good.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
---
diff --git a/arch/i386/kernel/microcode.c b/arch/i386/kernel/microcode.c
index 83f825f..d865d04 100644
--- a/arch/i386/kernel/microcode.c
+++ b/arch/i386/kernel/microcode.c
@@ -478,7 +478,7 @@ static int __init microcode_dev_init (void)
 	return 0;
 }
 
-static void __exit microcode_dev_exit (void)
+static void microcode_dev_exit (void)
 {
 	misc_deregister(&microcode_dev);
 }
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
RE: BUG: sleeping function called from invalid context at ..., Christoph Lameter, (Wed May 30, 3:39 pm)
RE: BUG: sleeping function called from invalid context at ..., Christoph Lameter, (Wed May 30, 4:31 pm)
Re: BUG: sleeping function called from invalid context at ..., Christoph Lameter, (Wed May 30, 4:53 pm)
Re: BUG: sleeping function called from invalid context at ..., Christoph Lameter, (Wed May 30, 5:09 pm)
RE: BUG: sleeping function called from invalid context at ..., Christoph Lameter, (Wed May 30, 8:19 pm)
[PATCH] net/hp100: fix section mismatch warning, Sam Ravnborg, (Thu May 31, 1:08 pm)
Re: BUG: sleeping function called from invalid context at ..., Christoph Lameter, (Thu May 31, 1:42 pm)
[PATCH] isdn: fix section mismatch warnings, Sam Ravnborg, (Thu May 31, 1:46 pm)
[PATCH] microcode: fix section mismatch warning, Sam Ravnborg, (Thu May 31, 1:51 pm)
Re: BUG: sleeping function called from invalid context at ..., Christoph Lameter, (Thu May 31, 9:05 pm)
Re: BUG: sleeping function called from invalid context at ..., Christoph Lameter, (Thu May 31, 9:45 pm)
linux-ia64 build warning messages, Russ Anderson, (Tue Jun 5, 7:55 am)
Re: linux-ia64 build warning messages, Peter Chubb, (Wed Jun 6, 10:00 pm)