]> git.baikalelectronics.ru Git - kernel.git/commit
kthread: silence bogus section mismatch warning
authorSatyam Sharma <ssatyam@cse.iitk.ac.in>
Tue, 31 Jul 2007 07:39:16 +0000 (00:39 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 31 Jul 2007 22:39:42 +0000 (15:39 -0700)
commita22420da61996e8ec2f40e30fca82a936f98262f
tree8a19854d3ab326d7157065a72528db2bf91bce21
parent330ada90f56fa958a6fe17eb22994603aacb94da
kthread: silence bogus section mismatch warning

WARNING: kernel/built-in.o(.text+0x16910): Section mismatch:
reference to .init.text: (between 'kthreadd' and 'init_waitqueue_head')

comes because kernel/kthread.c:kthreadd() is not __init but calls
kthreadd_setup() which is __init. But this is ok, because kthreadd_setup()
is only ever called at init time, and then kthreadd() proceeds into its
"for (;;)" loop. We could mark kthreadd __init_refok, but kthreadd_setup()
with just one callsite and 4 lines in it (it's been that small since
886c1d13790b8809) doesn't need to be a separate function at all -- so let's
just move those four lines at beginning of kthreadd() itself.

Signed-off-by: Satyam Sharma <ssatyam@cse.iitk.ac.in>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/kthread.c