linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: l2x0: fix compile error on !CONFIG_USE_OF
@ 2011-11-09 18:53 Olof Johansson
  2011-11-09 20:14 ` Rob Herring
  2011-11-17 13:41 ` Barry Song
  0 siblings, 2 replies; 3+ messages in thread
From: Olof Johansson @ 2011-11-09 18:53 UTC (permalink / raw)
  To: linux-arm-kernel

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.

Signed-off-by: Olof Johansson <olof@lixom.net>
Cc: Rob Herring <rob.herring@calxeda.com>
---
 arch/arm/include/asm/hardware/cache-l2x0.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/arm/include/asm/hardware/cache-l2x0.h b/arch/arm/include/asm/hardware/cache-l2x0.h
index 1db1143..7df239b 100644
--- a/arch/arm/include/asm/hardware/cache-l2x0.h
+++ b/arch/arm/include/asm/hardware/cache-l2x0.h
@@ -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
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH] ARM: l2x0: fix compile error on !CONFIG_USE_OF
  2011-11-09 18:53 [PATCH] ARM: l2x0: fix compile error on !CONFIG_USE_OF Olof Johansson
@ 2011-11-09 20:14 ` Rob Herring
  2011-11-17 13:41 ` Barry Song
  1 sibling, 0 replies; 3+ messages in thread
From: Rob Herring @ 2011-11-09 20:14 UTC (permalink / raw)
  To: linux-arm-kernel

On 11/09/2011 12:53 PM, Olof Johansson wrote:
> 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.
> 
> Signed-off-by: Olof Johansson <olof@lixom.net>
> Cc: Rob Herring <rob.herring@calxeda.com>

Sigh... I guess the platforms I built happened to include errno.h first.

Acked-by: Rob Herring <rob.herring@calxeda.com>

> ---
>  arch/arm/include/asm/hardware/cache-l2x0.h |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/include/asm/hardware/cache-l2x0.h b/arch/arm/include/asm/hardware/cache-l2x0.h
> index 1db1143..7df239b 100644
> --- a/arch/arm/include/asm/hardware/cache-l2x0.h
> +++ b/arch/arm/include/asm/hardware/cache-l2x0.h
> @@ -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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] ARM: l2x0: fix compile error on !CONFIG_USE_OF
  2011-11-09 18:53 [PATCH] ARM: l2x0: fix compile error on !CONFIG_USE_OF Olof Johansson
  2011-11-09 20:14 ` Rob Herring
@ 2011-11-17 13:41 ` Barry Song
  1 sibling, 0 replies; 3+ messages in thread
From: Barry Song @ 2011-11-17 13:41 UTC (permalink / raw)
  To: linux-arm-kernel

2011/11/10 Olof Johansson <olof@lixom.net>:
> 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.
>
> Signed-off-by: Olof Johansson <olof@lixom.net>
> Cc: Rob Herring <rob.herring@calxeda.com>

Acked-by: Barry Song <baohua.song@csr.com>

> ---
> ?arch/arm/include/asm/hardware/cache-l2x0.h | ? ?2 ++
> ?1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/include/asm/hardware/cache-l2x0.h b/arch/arm/include/asm/hardware/cache-l2x0.h
> index 1db1143..7df239b 100644
> --- a/arch/arm/include/asm/hardware/cache-l2x0.h
> +++ b/arch/arm/include/asm/hardware/cache-l2x0.h
> @@ -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
> --
> 1.7.5.4
>
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-11-17 13:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-09 18:53 [PATCH] ARM: l2x0: fix compile error on !CONFIG_USE_OF Olof Johansson
2011-11-09 20:14 ` Rob Herring
2011-11-17 13:41 ` Barry Song

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).