[PATCH uboot v2016.05-aspeed-openbmc/v2016.05-ast2500] aspeed: fix compile warning in memmove_dma()

Cédric Le Goater clg at kaod.org
Mon Jun 27 18:43:28 AEST 2016


arch/arm/mach-aspeed/flash.c: In function 'memmove_dma':
arch/arm/mach-aspeed/flash.c:1390:55: warning: assignment makes integer from pointer without a cast [enabled by default]
  *(ulong *) (AST_FMC_BASE + REG_FLASH_DMA_FLASH_BASE) = (ulong *) (src);
                                                       ^
arch/arm/mach-aspeed/flash.c:1391:54: warning: assignment makes integer from pointer without a cast [enabled by default]
  *(ulong *) (AST_FMC_BASE + REG_FLASH_DMA_DRAM_BASE) = (ulong *) (dest);
                                                      ^
There is no need to cast with a pointer type. memmove_dma() is not used
today but let's keep it as this is a supported feature we could use.

Signed-off-by: Cédric Le Goater <clg at kaod.org>
---
 arch/arm/mach-aspeed/flash.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-aspeed/flash.c b/arch/arm/mach-aspeed/flash.c
index 51db87261d53..9c5ead6fd7ae 100644
--- a/arch/arm/mach-aspeed/flash.c
+++ b/arch/arm/mach-aspeed/flash.c
@@ -1387,8 +1387,8 @@ void memmove_dma(void * dest,const void *src,size_t count)
 	*(volatile ulong *) (AST_FMC_BASE + CS0_CTRL) &= ~CE_HIGH;
 
 	*(ulong *) (AST_FMC_BASE + REG_FLASH_DMA_CONTROL) = (ulong) (~FLASH_DMA_ENABLE);
-	*(ulong *) (AST_FMC_BASE + REG_FLASH_DMA_FLASH_BASE) = (ulong *) (src);
-	*(ulong *) (AST_FMC_BASE + REG_FLASH_DMA_DRAM_BASE) = (ulong *) (dest);
+	*(ulong *) (AST_FMC_BASE + REG_FLASH_DMA_FLASH_BASE) = (ulong) (src);
+	*(ulong *) (AST_FMC_BASE + REG_FLASH_DMA_DRAM_BASE) = (ulong) (dest);
 	*(ulong *) (AST_FMC_BASE + REG_FLASH_DMA_LENGTH) = (ulong) (count_align);
 	*(ulong *) (AST_FMC_BASE + REG_FLASH_DMA_CONTROL) = (ulong) (FLASH_DMA_ENABLE);
 
-- 
2.1.4



More information about the openbmc mailing list