All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] sh: fix build error in cache.h
Date: Mon, 31 Oct 2011 10:44:13 +0900	[thread overview]
Message-ID: <4EADFD6C.4070502@renesas.com> (raw)

In the latest U-Boot, the include/common.h includes the asm/cache.h.
So, the dcache_invalid_range() in the arch/sh/include/asm/cache.h is
multiple defination.

sh4-linux-gnu-ld  -e 0x8FFC0000 --defsym reloc_dst=0x8FFC0000 -r -o libsh4.o  cpu.o interrupts.o watchdog.o cache.o start.o
interrupts.o: In function `dcache_wback_range':
/home/u-boot/u-boot-sh/include/asm/cache.h:14: multiple definition of `dcache_wback_range'
cpu.o:/home/shimoda/development/u-boot/u-boot-sh/include/asm/cache.h:14: first defined here
interrupts.o: In function `dcache_invalid_range':
/home/u-boot/u-boot-sh/include/asm/cache.h:25: multiple definition of `dcache_invalid_range'
cpu.o:/home/shimoda/development/u-boot/u-boot-sh/include/asm/cache.h:25: first defined here
...

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
---
 arch/sh/include/asm/cache.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/sh/include/asm/cache.h b/arch/sh/include/asm/cache.h
index 6ffab4d..978cd8c 100644
--- a/arch/sh/include/asm/cache.h
+++ b/arch/sh/include/asm/cache.h
@@ -10,7 +10,7 @@ int cache_control(unsigned int cmd);
 struct __large_struct { unsigned long buf[100]; };
 #define __m(x) (*(struct __large_struct *)(x))

-void dcache_wback_range(u32 start, u32 end)
+static inline void dcache_wback_range(u32 start, u32 end)
 {
 	u32 v;

@@ -21,7 +21,7 @@ void dcache_wback_range(u32 start, u32 end)
 	}
 }

-void dcache_invalid_range(u32 start, u32 end)
+static inline void dcache_invalid_range(u32 start, u32 end)
 {
 	u32 v;

-- 
1.7.1

             reply	other threads:[~2011-10-31  1:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-31  1:44 Yoshihiro Shimoda [this message]
2011-10-31  2:25 ` [U-Boot] [PATCH] sh: fix build error in cache.h Mike Frysinger
2011-10-31  2:35   ` Yoshihiro Shimoda

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4EADFD6C.4070502@renesas.com \
    --to=yoshihiro.shimoda.uh@renesas.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.