From bbc39e56bbce703f40d676587ca59129766370eb Mon Sep 17 00:00:00 2001 From: Ye Li Date: Mon, 24 Sep 2018 20:37:30 -0700 Subject: MLK-19691 mx7ulp_evk: Fix build warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix the build warning below on iMX7ULP EVK board. The root cause is compiler uses integer for PHYS_SDRAM 0x60000000 when calculating the value for CONFIG_SYS_MEMTEST_END. So we add "ul" postfix to define its type to ulong. In file included from include/config.h:6:0, from include/common.h:21, from cmd/mem.c:14: cmd/mem.c: In function ‘do_mem_mtest’: include/configs/mx7ulp_evk.h:91:63: warning: integer overflow in expression [-Woverflow] #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + (PHYS_SDRAM_SIZE >> 1)) ^ cmd/mem.c:877:8: note: in expansion of macro ‘CONFIG_SYS_MEMTEST_END’ end = CONFIG_SYS_MEMTEST_END; Signed-off-by: Ye Li Reviewed-by: Peng Fan (cherry picked from commit 5eb040227b2d591acfd04d75a234ede1f78a198a) --- include/configs/mx7ulp_evk.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/configs/mx7ulp_evk.h b/include/configs/mx7ulp_evk.h index a1d0bd3667..bbb7cb287d 100644 --- a/include/configs/mx7ulp_evk.h +++ b/include/configs/mx7ulp_evk.h @@ -80,7 +80,7 @@ /* Physical Memory Map */ #define CONFIG_NR_DRAM_BANKS 1 -#define PHYS_SDRAM 0x60000000 +#define PHYS_SDRAM 0x60000000ul #define PHYS_SDRAM_SIZE SZ_1G #define CONFIG_SYS_MEMTEST_START PHYS_SDRAM #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM -- cgit v1.2.3