Skip to contentSkip to conversation

ARM: kirkwood: add missing include for nsa310

PATCH New Arnd Bergmann 2 participants 3 messages Feb 14, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: kirkwood: add missing include for nsa310

Patch 92cb7625 "ARM: kirkwood: nsa310: cleanup includes and unneeded code" was a little too quick, since there is still an I2C_BOARD_INFO left in this file at the moment. Once that is gone and replaced by a DT description of the devices, the inclusion can be removed again

Without this patch, building kirkwood_defconfig results in:

arch/arm/mach-kirkwood/board-nsa310.c:42:74: error: array type has incomplete element type arch/arm/mach-kirkwood/board-nsa310.c:43:2: error: implicit declaration of function 'I2C_BOARD_INFO' [-Werror=implicit-function-declaration] arch/arm/mach-kirkwood/board-nsa310.c: In function 'nsa310_gpio_init':
arch/arm/mach-kirkwood/board-nsa310.c:71:3: error: 'pm_power_off' undeclared (first use in this function) arch/arm/mach-kirkwood/board-nsa310.c:71:3: note: each undeclared identifier is reported only once for each function it appears in arch/arm/mach-kirkwood/board-nsa310.c: In function 'nsa310_init':
arch/arm/mach-kirkwood/board-nsa310.c:83:2: error: implicit declaration of function 'i2c_register_board_info' [-Werror=implicit-function-declaration] arch/arm/mach-kirkwood/board-nsa310.c:83:121: error: negative width in bit-field '<anonymous>' arch/arm/mach-kirkwood/board-nsa310.c: At top level:
arch/arm/mach-kirkwood/board-nsa310.c:42:74: warning: 'nsa310_i2c_info' defined but not used [-Wunused-variable]
cc1: some warnings being treated as errors

---
 arch/arm/mach-kirkwood/board-nsa310.c | 1 +
 1 file changed, 1 insertion(+)

This file has been broken for a while in arm-soc,
so I'm applying the obvious fix directly to the
next/cleanup branch that introduced the problem.

arch/arm/mach-kirkwood/board-nsa310.c +1 -0
index 61c4b18..970174a 100644
@@ -11,6 +11,7 @@
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/gpio.h>
+#include <linux/i2c.h>
 #include <mach/kirkwood.h>
 #include <linux/of.h>
 #include "common.h"
Signature · 1 line
1.8.1.2
#1 lore raw

PATCH 1/1 ARM: prima2: fix __init section for cpu hotplug

The code in arch/arm/mach-prima2/headsmp.S is used for both boot time initialization and for cpu hotplug, so it must not be discarded after the initial boot is complete. This replaces the __INIT annotation with __CPUINIT, and marks the sirfsoc_cpu_die as __ref to annotate that it correctly uses the sections.

Without this patch, building prima2_defconfig results in:

WARNING: arch/arm/mach-prima2/built-in.o(.cpuinit.text+0x130): Section mismatch in reference from the function sirfsoc_boot_secondary() to the function .init.text:sirfsoc_secondary_startup() The function __cpuinit sirfsoc_boot_secondary() references
a function __init sirfsoc_secondary_startup().
If sirfsoc_secondary_startup is only used by sirfsoc_boot_secondary then
annotate sirfsoc_secondary_startup with a matching annotation.

---
 arch/arm/mach-prima2/headsmp.S | 3 ++-
 arch/arm/mach-prima2/hotplug.c | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

I'm applying this as an obvious fix directly on the next/soc branch that introduced the problem.

arch/arm/mach-prima2/headsmp.S +2 -1
index 6ec19d5..ada82d0 100644
@@ -9,7 +9,8 @@
 #include <linux/linkage.h>
 #include <linux/init.h>
 
-	__INIT
+	__CPUINIT
+
 /*
  * Cold boot and hardware reset show different behaviour,
  * system will be always panic if we warm-reset the board
arch/arm/mach-prima2/hotplug.c +1 -1
index 97c1ee5..f4b17cb 100644
@@ -35,7 +35,7 @@ static inline void platform_do_lowpower(unsigned int cpu)
  *
  * Called with IRQs disabled
  */
-void sirfsoc_cpu_die(unsigned int cpu)
+void __ref sirfsoc_cpu_die(unsigned int cpu)
 {
 	platform_do_lowpower(cpu);
 }
Signature · 1 line
1.8.1.2
#2 lore raw

PATCH 1/1 ARM: kirkwood: add missing include for nsa310

In reply to Arnd Bergmann
Quoted 22 lines · Arnd Bergmann

Patch 92cb7625 "ARM: kirkwood: nsa310: cleanup includes and unneeded code" was a little too quick, since there is still an I2C_BOARD_INFO left in this file at the moment. Once that is gone and replaced by a DT description of the devices, the inclusion can be removed again

Without this patch, building kirkwood_defconfig results in:

arch/arm/mach-kirkwood/board-nsa310.c:42:74: error: array type has incomplete element type arch/arm/mach-kirkwood/board-nsa310.c:43:2: error: implicit declaration of function 'I2C_BOARD_INFO' [-Werror=implicit-function-declaration] arch/arm/mach-kirkwood/board-nsa310.c: In function 'nsa310_gpio_init':
arch/arm/mach-kirkwood/board-nsa310.c:71:3: error: 'pm_power_off' undeclared (first use in this function) arch/arm/mach-kirkwood/board-nsa310.c:71:3: note: each undeclared identifier is reported only once for each function it appears in arch/arm/mach-kirkwood/board-nsa310.c: In function 'nsa310_init':
arch/arm/mach-kirkwood/board-nsa310.c:83:2: error: implicit declaration of function 'i2c_register_board_info' [-Werror=implicit-function-declaration] arch/arm/mach-kirkwood/board-nsa310.c:83:121: error: negative width in bit-field '<anonymous>' arch/arm/mach-kirkwood/board-nsa310.c: At top level:
arch/arm/mach-kirkwood/board-nsa310.c:42:74: warning: 'nsa310_i2c_info' defined but not used [-Wunused-variable]
cc1: some warnings being treated as errors

Quoted 8 lines
---
 arch/arm/mach-kirkwood/board-nsa310.c | 1 +
 1 file changed, 1 insertion(+)

This file has been broken for a while in arm-soc,
so I'm applying the obvious fix directly to the
next/cleanup branch that introduced the problem.

Thanks, Arnd.

Jason.