Skip to content

Commit e270219

Browse files
rmullickIngo Molnar
authored and
Ingo Molnar
committed
kernel/profile.c: fix section mismatch warning
Impact: fix section mismatch warning in kernel/profile.c Here, profile_nop function has been called from a non-init function create_hash_tables(void). Which generetes a section mismatch warning. Previously, create_hash_tables(void) was a init function. So, removing __init from create_hash_tables(void) requires profile_nop to be non-init. This patch makes profile_nop function inline and fixes the following warning: WARNING: vmlinux.o(.text+0x6ebb6): Section mismatch in reference from the function create_hash_tables() to the function .init.text:profile_nop() The function create_hash_tables() references the function __init profile_nop(). This is often because create_hash_tables lacks a __init annotation or the annotation of profile_nop is wrong. Signed-off-by: Rakib Mullick <rakib.mullick@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
1 parent 5821e1b commit e270219

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/profile.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@ static const struct file_operations proc_profile_operations = {
544544
};
545545

546546
#ifdef CONFIG_SMP
547-
static void __init profile_nop(void *unused)
547+
static inline void profile_nop(void *unused)
548548
{
549549
}
550550

0 commit comments

Comments
 (0)