[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6388835f69fc4a69839a132636da7188@pinky>
Date: Mon, 27 Nov 2006 04:21:14 +0000
From: Andy Whitcroft <apw@...dowen.org>
To: Andrew Morton <akpm@...l.org>
Cc: Rusty Russell <rusty@...tcorp.com.au>, linux-kernel@...r.kernel.org
Subject: [PATCH] paravirt reorder functions to avoid unspecified behaviour
paravirt: reorder functions to avoid unspecified behaviour
The paravirt ops introduce a 'weak' attribute onto memory_setup().
Code ordering leads to the following warnings on x86:
arch/i386/kernel/setup.c:651: warning: weak declaration of
`memory_setup' after first use results in unspecified behavior
Move memory_setup() to avoid this.
Signed-off-by: Andy Whitcroft <apw@...dowen.org>
---
diff --git a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c
index 8be04da..79df6e6 100644
--- a/arch/i386/kernel/setup.c
+++ b/arch/i386/kernel/setup.c
@@ -494,6 +494,12 @@ static void set_mca_bus(int x)
static void set_mca_bus(int x) { }
#endif
+/* Overridden in paravirt.c if CONFIG_PARAVIRT */
+char * __attribute__((weak)) memory_setup(void)
+{
+ return machine_specific_memory_setup();
+}
+
/*
* Determine if we were loaded by an EFI loader. If so, then we have also been
* passed the efi memmap, systab, etc., so we should use these data structures
@@ -646,12 +652,6 @@ void __init setup_arch(char **cmdline_p)
tsc_init();
}
-/* Overridden in paravirt.c if CONFIG_PARAVIRT */
-char * __attribute__((weak)) memory_setup(void)
-{
- return machine_specific_memory_setup();
-}
-
static __init int add_pcspkr(void)
{
struct platform_device *pd;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists