ARM: l2x0: fix compile error on !CONFIG_USE_OF
Subsystems (2)
PATCH 1/1 ARM: l2x0: fix compile error on !CONFIG_USE_OF
fae2b89ab1 (ARM: l2x0: add empty l2x0_of_init) adds a static inline function that returns -ENODEV, but at least on tegra cache-l2x0.h is included without errno.h being pulled in first, resulting in compile errors if OF isn't enabled:
In file included from arch/arm/mach-tegra/common.c:26:arch/arm/include/asm/hardware/cache-l2x0.h: In function 'l2x0_of_init':arch/arm/include/asm/hardware/cache-l2x0.h:110: error: 'ENODEV' undeclared (first use in this function) arch/arm/include/asm/hardware/cache-l2x0.h:110: error: (Each undeclared identifier is reported only once arch/arm/include/asm/hardware/cache-l2x0.h:110: error: for each function it appears in.)
Add errno.h to the include file to make it self-contained.
--- arch/arm/include/asm/hardware/cache-l2x0.h | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
arch/arm/include/asm/hardware/cache-l2x0.h +2 -0
@@ -20,6 +20,8 @@#ifndef __ASM_ARM_HARDWARE_L2X0_H#define __ASM_ARM_HARDWARE_L2X0_H +#include <linux/errno.h> +#define L2X0_CACHE_ID 0x000#define L2X0_CACHE_TYPE 0x004#define L2X0_CTRL 0x100
Signature · 1 line
1.7.5.4
PATCH 1/1 ARM: l2x0: fix compile error on !CONFIG_USE_OF
Quoted 11 lines · Olof Johansson
fae2b89ab1(ARM: l2x0: add emptyl2x0_of_init) adds a static inline function that returns-ENODEV, but at least on tegracache-l2x0.his included withouterrno.hbeing pulled in first, resulting in compile errors if OF isn't enabled:In file included from
arch/arm/mach-tegra/common.c:26:arch/arm/include/asm/hardware/cache-l2x0.h: In function 'l2x0_of_init':arch/arm/include/asm/hardware/cache-l2x0.h:110: error: 'ENODEV' undeclared (first use in this function)arch/arm/include/asm/hardware/cache-l2x0.h:110: error: (Each undeclared identifier is reported only oncearch/arm/include/asm/hardware/cache-l2x0.h:110: error: for each function it appears in.)
Quoted 4 lines
Add
errno.hto the include file to make it self-contained.Signed-off-by Olof Johansson <[email protected]>Cc Rob Herring <[email protected]>
Sigh... I guess the platforms I built happened to include errno.h first.
Quoted 17 lines
--- arch/arm/include/asm/hardware/cache-l2x0.h | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)arch/arm/include/asm/hardware/cache-l2x0.h +2
-0@@ -20,6 +20,8 @@#ifndef __ASM_ARM_HARDWARE_L2X0_H#define __ASM_ARM_HARDWARE_L2X0_H +#include <linux/errno.h> +#define L2X0_CACHE_ID 0x000#define L2X0_CACHE_TYPE 0x004#define L2X0_CTRL 0x100
PATCH 1/1 ARM: l2x0: fix compile error on !CONFIG_USE_OF
In reply to Olof Johansson2011/11/10 Olof Johansson <[email protected]>:
Quoted 11 lines
fae2b89ab1(ARM: l2x0: add emptyl2x0_of_init) adds a static inline function that returns-ENODEV, but at least on tegracache-l2x0.his included withouterrno.hbeing pulled in first, resulting in compile errors if OF isn't enabled:In file included from
arch/arm/mach-tegra/common.c:26:arch/arm/include/asm/hardware/cache-l2x0.h: In function 'l2x0_of_init':arch/arm/include/asm/hardware/cache-l2x0.h:110: error: 'ENODEV' undeclared (first use in this function)arch/arm/include/asm/hardware/cache-l2x0.h:110: error: (Each undeclared identifier is reported only oncearch/arm/include/asm/hardware/cache-l2x0.h:110: error: for each function it appears in.)
Quoted 4 lines
Add
errno.hto the include file to make it self-contained.Signed-off-by Olof Johansson <[email protected]>Cc Rob Herring <[email protected]>
Quoted 21 lines
---
?arch/arm/include/asm/hardware/cache-l2x0.h | ? ?2 ++ ?1 files changed, 2 insertions(+), 0 deletions(-)arch/arm/include/asm/hardware/cache-l2x0.h +0
-0@@ -20,6 +20,8 @@?#ifndef
__ASM_ARM_HARDWARE_L2X0_H
?#define__ASM_ARM_HARDWARE_L2X0_Harch/arm/include/asm/hardware/cache-l2x0.h +2
-0+#include <linux/errno.h> +?#define
L2X0_CACHE_ID? ? ? ? ? ? ? ? ?0x000 ?#defineL2X0_CACHE_TYPE? ? ? ? ? ? ? ? ? ? ? ?0x004 ?#defineL2X0_CTRL? ? ? ? ? ? ? ? ? ? ?0x100 --
1.7.5.4