From b3796d92086ecea4c4825fa232da60b6d6f354af Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Sun, 23 Sep 2012 22:36:35 +0000 Subject: [PATCH 1/3] ARM: shmobile: mark shmobile_init_late as __init Patch 35f2b0bd59 "ARM: shmobile: Move definition of shmobile_init_late() to header" moved the definition of the shmobile_init_late function, but dropped the __init annotation, which is now causing warnings because the function calls shmobile_suspend_init, which is also marked init. Without this patch, building kota2_defconfig results in: WARNING: vmlinux.o(.text+0xb7c8): Section mismatch in reference from the function shmobile_init_late() to the function .init.text:shmobile_suspend_init() The function shmobile_init_late() references the function __init shmobile_suspend_init(). This is often because shmobile_init_late lacks a __init annotation or the annotation of shmobile_suspend_init is wrong. Signed-off-by: Arnd Bergmann Cc: Rafael J. Wysocki Cc: Magnus Damm Cc: Simon Horman --- arch/arm/mach-shmobile/include/mach/common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-shmobile/include/mach/common.h b/arch/arm/mach-shmobile/include/mach/common.h index ed77ab8c914..d47e215aca8 100644 --- a/arch/arm/mach-shmobile/include/mach/common.h +++ b/arch/arm/mach-shmobile/include/mach/common.h @@ -100,7 +100,7 @@ static inline int shmobile_cpu_is_dead(unsigned int cpu) { return 1; } extern void shmobile_smp_init_cpus(unsigned int ncores); -static inline void shmobile_init_late(void) +static inline void __init shmobile_init_late(void) { shmobile_suspend_init(); shmobile_cpuidle_init(); From c6e9fbbf4c9aa837c0d39a097f96aaf4f90dfef1 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Mon, 30 Apr 2012 12:41:21 +0000 Subject: [PATCH 2/3] ARM: assabet: fix bogus warning in get_assabet_scr (again) Russell fixed this bogus warning before in 2f3eca8b4f "Shut up gcc warning in assabet.c", but apparently gcc has become smarter (or dumber) since 2005, and the same warning came up again. This uses the uninitialized_var() macro to convince gcc that the variable is actually being initialized. 100 times in fact. Without this patch, building assabet_defconfig results in: arch/arm/mach-sa1100/assabet.c: In function 'fixup_assabet': arch/arm/mach-sa1100/assabet.c:397:6: warning: 'scr' may be used uninitialized in this function [-Wuninitialized] arch/arm/mach-sa1100/assabet.c:389:16: note: 'scr' was declared here Signed-off-by: Arnd Bergmann Cc: Russell King --- arch/arm/mach-sa1100/assabet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-sa1100/assabet.c b/arch/arm/mach-sa1100/assabet.c index e1ccda6128e..6a7ad3c2a3f 100644 --- a/arch/arm/mach-sa1100/assabet.c +++ b/arch/arm/mach-sa1100/assabet.c @@ -388,7 +388,7 @@ static void __init map_sa1100_gpio_regs( void ) */ static void __init get_assabet_scr(void) { - unsigned long scr, i; + unsigned long uninitialized_var(scr), i; GPDR |= 0x3fc; /* Configure GPIO 9:2 as outputs */ GPSR = 0x3fc; /* Write 0xFF to GPIO 9:2 */ From 21c8715f0a1f4df8bfa2bd6f3915e5e33c1c2e6e Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Mon, 24 Sep 2012 07:22:02 +0000 Subject: [PATCH 3/3] ARM: integrator: use __iomem pointers for MMIO, part 2 Due to some interesting merges in the integrator code, not all users of mmio pointers were converted before, this fixes all warnings that got introduced as a consequence. Signed-off-by: Arnd Bergmann Cc: Linus Walleij Cc: Russell King --- arch/arm/mach-integrator/include/mach/cm.h | 2 +- arch/arm/mach-integrator/include/mach/platform.h | 6 +++--- arch/arm/mach-integrator/integrator_ap.c | 2 +- arch/arm/mach-integrator/integrator_cp.c | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/arch/arm/mach-integrator/include/mach/cm.h b/arch/arm/mach-integrator/include/mach/cm.h index 1a78692e32a..202e6a57f10 100644 --- a/arch/arm/mach-integrator/include/mach/cm.h +++ b/arch/arm/mach-integrator/include/mach/cm.h @@ -3,7 +3,7 @@ */ void cm_control(u32, u32); -#define CM_CTRL IO_ADDRESS(INTEGRATOR_HDR_CTRL) +#define CM_CTRL __io_address(INTEGRATOR_HDR_CTRL) #define CM_CTRL_LED (1 << 0) #define CM_CTRL_nMBDET (1 << 1) diff --git a/arch/arm/mach-integrator/include/mach/platform.h b/arch/arm/mach-integrator/include/mach/platform.h index 4c034752685..efeac5d0bc9 100644 --- a/arch/arm/mach-integrator/include/mach/platform.h +++ b/arch/arm/mach-integrator/include/mach/platform.h @@ -324,9 +324,9 @@ */ #define PHYS_PCI_V3_BASE 0x62000000 -#define PCI_MEMORY_VADDR 0xe8000000 -#define PCI_CONFIG_VADDR 0xec000000 -#define PCI_V3_VADDR 0xed000000 +#define PCI_MEMORY_VADDR IOMEM(0xe8000000) +#define PCI_CONFIG_VADDR IOMEM(0xec000000) +#define PCI_V3_VADDR IOMEM(0xed000000) /* ------------------------------------------------------------------------ * Integrator Interrupt Controllers diff --git a/arch/arm/mach-integrator/integrator_ap.c b/arch/arm/mach-integrator/integrator_ap.c index d5b5435a09a..e6617c134fa 100644 --- a/arch/arm/mach-integrator/integrator_ap.c +++ b/arch/arm/mach-integrator/integrator_ap.c @@ -157,7 +157,7 @@ static struct map_desc ap_io_desc[] __initdata = { static void __init ap_map_io(void) { iotable_init(ap_io_desc, ARRAY_SIZE(ap_io_desc)); - vga_base = PCI_MEMORY_VADDR; + vga_base = (unsigned long)PCI_MEMORY_VADDR; pci_map_io_early(__phys_to_pfn(PHYS_PCI_IO_BASE)); } diff --git a/arch/arm/mach-integrator/integrator_cp.c b/arch/arm/mach-integrator/integrator_cp.c index 6870a1fbcd7..5b08e8e4cc8 100644 --- a/arch/arm/mach-integrator/integrator_cp.c +++ b/arch/arm/mach-integrator/integrator_cp.c @@ -261,6 +261,8 @@ static void __init intcp_init_early(void) #endif } +#ifdef CONFIG_OF + static void __init intcp_timer_init_of(void) { struct device_node *node; @@ -297,8 +299,6 @@ static struct sys_timer cp_of_timer = { .init = intcp_timer_init_of, }; -#ifdef CONFIG_OF - static const struct of_device_id fpga_irq_of_match[] __initconst = { { .compatible = "arm,versatile-fpga-irq", .data = fpga_irq_of_init, }, { /* Sentinel */ }