2008-02-04 03:13:08

by Peter Teoh

[permalink] [raw]
Subject: Section mismatch: kernel/relay.c

The following is to fix the following warning (see earlier email):

WARNING: kernel/built-in.o(.data+0x7c00): Section mismatch in
reference from the variable relay_hotcpu_callback_nb.18789 to the
function .cpuinit.text:relay_hotcpu_callback()
The variable relay_hotcpu_callback_nb.18789 references
the function __cpuinit relay_hotcpu_callback()
If the reference is valid then annotate the
variable with __init* (see linux/init.h) or name the variable:
*driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,

Signed-off-by: Peter Teoh <[email protected]>

--- relay.c.orig 2008-02-04 10:49:41.000000000 +0800
+++ relay.c 2008-02-04 10:50:53.000000000 +0800
@@ -477,7 +477,7 @@ static void setup_callbacks(struct rchan
*
* Returns the success/failure of the operation. (%NOTIFY_OK, %NOTIFY_BAD)
*/
-static int __cpuinit relay_hotcpu_callback(struct notifier_block *nb,
+static int relay_hotcpu_callback(struct notifier_block *nb,
unsigned long action,
void *hcpu)
{