linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/5] Convert some functions to __init to avoid MODPOST warnings
@ 2006-12-19  5:15 Vivek Goyal
  0 siblings, 0 replies; only message in thread
From: Vivek Goyal @ 2006-12-19  5:15 UTC (permalink / raw)
  To: linux kernel mailing list, Fastboot mailing list
  Cc: Morton Andrew Morton, Andi Kleen, Sam Ravnborg, Eric W. Biederman



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 <vgoyal@in.ibm.com>
---

 arch/i386/kernel/acpi/boot.c       |    2 +-
 arch/i386/kernel/acpi/earlyquirk.c |    2 +-
 arch/i386/kernel/setup.c           |    2 +-
 init/main.c                        |    2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff -puN arch/i386/kernel/acpi/boot.c~convert-some-functions-to-init-to-avoid-warnings arch/i386/kernel/acpi/boot.c
--- linux-2.6.19-rc1-reloc/arch/i386/kernel/acpi/boot.c~convert-some-functions-to-init-to-avoid-warnings	2006-12-15 14:08:59.000000000 +0530
+++ linux-2.6.19-rc1-reloc-root/arch/i386/kernel/acpi/boot.c	2006-12-15 14:08:59.000000000 +0530
@@ -333,7 +333,7 @@ acpi_parse_ioapic(acpi_table_entry_heade
 /*
  * Parse Interrupt Source Override for the ACPI SCI
  */
-static void acpi_sci_ioapic_setup(u32 gsi, u16 polarity, u16 trigger)
+static void __init acpi_sci_ioapic_setup(u32 gsi, u16 polarity, u16 trigger)
 {
 	if (trigger == 0)	/* compatible SCI trigger is level */
 		trigger = 3;
diff -puN arch/i386/kernel/acpi/earlyquirk.c~convert-some-functions-to-init-to-avoid-warnings arch/i386/kernel/acpi/earlyquirk.c
--- linux-2.6.19-rc1-reloc/arch/i386/kernel/acpi/earlyquirk.c~convert-some-functions-to-init-to-avoid-warnings	2006-12-15 14:08:59.000000000 +0530
+++ linux-2.6.19-rc1-reloc-root/arch/i386/kernel/acpi/earlyquirk.c	2006-12-15 14:08:59.000000000 +0530
@@ -50,7 +50,7 @@ static int __init check_bridge(int vendo
 	return 0;
 }
 
-static void check_intel(void)
+static void __init check_intel(void)
 {
 	u16 vendor, device;
 
diff -puN arch/i386/kernel/setup.c~convert-some-functions-to-init-to-avoid-warnings arch/i386/kernel/setup.c
--- linux-2.6.19-rc1-reloc/arch/i386/kernel/setup.c~convert-some-functions-to-init-to-avoid-warnings	2006-12-15 14:08:59.000000000 +0530
+++ linux-2.6.19-rc1-reloc-root/arch/i386/kernel/setup.c	2006-12-15 14:08:59.000000000 +0530
@@ -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();
 }
diff -puN init/main.c~convert-some-functions-to-init-to-avoid-warnings init/main.c
--- linux-2.6.19-rc1-reloc/init/main.c~convert-some-functions-to-init-to-avoid-warnings	2006-12-15 14:08:59.000000000 +0530
+++ linux-2.6.19-rc1-reloc-root/init/main.c	2006-12-15 14:09:57.000000000 +0530
@@ -698,7 +698,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
_

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-12-19  5:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-12-19  5:15 [PATCH 2/5] Convert some functions to __init to avoid MODPOST warnings Vivek Goyal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).