Re: Section mismatch: kernel/workqueue.c

From: Sam Ravnborg
Date: Mon Feb 04 2008 - 00:55:46 EST


On Mon, Feb 04, 2008 at 10:57:18AM +0800, Peter Teoh wrote:
> During compilation of the linus tree the following warnings are encountered:
>
> WARNING: kernel/built-in.o(.data+0x2480): Section mismatch in
> reference from the variable workqueue_cpu_callback_nb.14223 to the
> function .devinit.text:workqueue_cpu_callback()
> The variable workqueue_cpu_callback_nb.14223 references
> the function __devinit workqueue_cpu_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,
>
> This fix is to correct the following warning during compilation.
> Based on my "elementary" analysis, as it is called from other
> non-__init functions, this function cannot be declared as __devinit(),
> correct? Please comment. Thanks :-).
>
> Signed-off-by: Peter Teoh <htmldeveloper@xxxxxxxxx>

Hi Peter.
I changed this and the following warning from relay using following
patch.

Sam