Re: Section mismatch warnings

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Gabriel C <nix.or.die@...>
Cc: Linux Kernel Mailing List <linux-kernel@...>, <J.E.J.Bottomley@...>
Date: Monday, July 30, 2007 - 2:51 pm

On Mon, Jul 30, 2007 at 07:48:09PM +0200, Gabriel C wrote:
I only looked at the Section mismatch warnings.
They are fixed by following patch.

James - I assume you will take this forward?

	Sam 

[PATCH] i386/voyager: fix section mismatch warnings

voyager_smp_prepare_boot_cpu is marked __devinit and calls init_gdt.
init_gdt is marked __cpuinit

Fix seems to make voyager_smp_prepare_boot_cpu __init since I cannot see that
function being used for HOTPLUG. Maybe HOTPLUG_CPU but not HOTPLUG.


voyager_cat_init is used only by smp_boot_cpus that is marked __init.
So fix is to mark voyager_cat_init as __init

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
---
diff --git a/arch/i386/mach-voyager/voyager_cat.c b/arch/i386/mach-voyager/voyager_cat.c
index 26a2d4c..f5acf06 100644
--- a/arch/i386/mach-voyager/voyager_cat.c
+++ b/arch/i386/mach-voyager/voyager_cat.c
@@ -568,8 +568,7 @@ static voyager_module_t *voyager_initial_module;
  * boot cpu *after* all memory initialisation has been done (so we can
  * use kmalloc) but before smp initialisation, so we can probe the SMP
  * configuration and pick up necessary information.  */
-void
-voyager_cat_init(void)
+void __init voyager_cat_init(void)
 {
 	voyager_module_t **modpp = &voyager_initial_module;
 	voyager_asic_t **asicpp;
diff --git a/arch/i386/mach-voyager/voyager_smp.c b/arch/i386/mach-voyager/voyager_smp.c
index b87f854..ac06a1c 100644
--- a/arch/i386/mach-voyager/voyager_smp.c
+++ b/arch/i386/mach-voyager/voyager_smp.c
@@ -1899,7 +1899,7 @@ voyager_smp_prepare_cpus(unsigned int max_cpus)
 	smp_boot_cpus();
 }
 
-static void __devinit voyager_smp_prepare_boot_cpu(void)
+static void __init voyager_smp_prepare_boot_cpu(void)
 {
 	init_gdt(smp_processor_id());
 	switch_to_new_gdt();
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Section mismatch warnings, Gabriel C, (Mon Jul 30, 1:48 pm)
Re: Section mismatch warnings, Sam Ravnborg, (Mon Jul 30, 2:51 pm)
Re: Section mismatch warnings, Gabriel C, (Mon Jul 30, 3:31 pm)
Re: Section mismatch warnings, Gabriel C, (Tue Jul 31, 3:45 pm)
Re: Section mismatch warnings, Sam Ravnborg, (Tue Jul 31, 4:48 pm)
Re: Section mismatch warnings, Gabriel C, (Tue Jul 31, 5:58 pm)
Re: Section mismatch warnings, Gabriel C, (Thu Aug 2, 10:27 am)
Re: Section mismatch warnings, Sam Ravnborg, (Thu Aug 2, 12:31 pm)
Re: Section mismatch warnings, Gabriel C, (Thu Aug 2, 1:12 pm)
Re: Section mismatch warnings, Sam Ravnborg, (Thu Aug 2, 1:59 pm)
Re: Section mismatch warnings, Gabriel C, (Thu Aug 2, 2:24 pm)