From: Vivek Goyal <vgoyal@in.ibm.com>
To: linux kernel mailing list <linux-kernel@vger.kernel.org>,
Fastboot mailing list <fastboot@lists.osdl.org>
Cc: Morton Andrew Morton <akpm@osdl.org>, Andi Kleen <ak@muc.de>,
Sam Ravnborg <sam@ravnborg.org>,
"Eric W. Biederman" <ebiederm@xmission.com>
Subject: [PATCH 2/5] Convert some functions to __init to avoid MODPOST warnings
Date: Tue, 19 Dec 2006 10:45:55 +0530 [thread overview]
Message-ID: <20061219051555.GB26052@in.ibm.com> (raw)
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
_
reply other threads:[~2006-12-19 5:16 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20061219051555.GB26052@in.ibm.com \
--to=vgoyal@in.ibm.com \
--cc=ak@muc.de \
--cc=akpm@osdl.org \
--cc=ebiederm@xmission.com \
--cc=fastboot@lists.osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sam@ravnborg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®