Skip to content

Commit

Permalink
[PATCH] i386: Convert some functions to __init to avoid MODPOST warnings
Browse files Browse the repository at this point in the history
o Some functions which should have been in init sections as they are called
  only once. Put them in init sections. Otherwise MODPOST generates warning
  as these functions are placed in .text and they end up accessing something
  in init sections.

WARNING: vmlinux - Section mismatch: reference to .init.text:migration_init
from .text between 'do_pre_smp_initcalls' (at offset 0xc01000d1) and
'run_init_process'

Signed-off-by: Vivek Goyal <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Andi Kleen <[email protected]>
  • Loading branch information
Vivek Goyal authored and Andi Kleen committed Jan 11, 2007
1 parent 0e0be25 commit 88d2032
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion arch/i386/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ static void set_mca_bus(int x) { }
#endif

/* Overridden in paravirt.c if CONFIG_PARAVIRT */
char * __attribute__((weak)) memory_setup(void)
char * __init __attribute__((weak)) memory_setup(void)
{
return machine_specific_memory_setup();
}
Expand Down
2 changes: 1 addition & 1 deletion init/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,7 @@ static void __init do_basic_setup(void)
do_initcalls();
}

static void do_pre_smp_initcalls(void)
static void __init do_pre_smp_initcalls(void)
{
extern int spawn_ksoftirqd(void);
#ifdef CONFIG_SMP
Expand Down

0 comments on commit 88d2032

Please sign in to comment.