[U-Boot] [PATCH V3] nitrogen: Use unsigned long to specify the total RAM size
Stefano Babic
sbabic at denx.de
Thu Mar 14 09:03:27 CET 2013
From: "fabio.estevam at freescale.com" <fabio.estevam at freescale.com>
When building for the nitrogen boards with 2GB the following warning happens:
nitrogen6x.c:89:38: warning: integer overflow in expression [-Woverflow]
2GB can not fit in 32-bits, so use ulong instead.
Reported-by: Albert Aribaud <albert.u.boot at aribaud.net>
Signed-off-by: Fabio Estevam <fabio.estevam at freescale.com>
Signed-off-by: Stefano Babic <sbabic at denx.de>
---
Changes since V1:
- move casting inside expression to force using unsigned long
board/boundary/nitrogen6x/nitrogen6x.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/board/boundary/nitrogen6x/nitrogen6x.c b/board/boundary/nitrogen6x/nitrogen6x.c
index 0dbb6d2..e5634d8 100644
--- a/board/boundary/nitrogen6x/nitrogen6x.c
+++ b/board/boundary/nitrogen6x/nitrogen6x.c
@@ -86,7 +86,7 @@ DECLARE_GLOBAL_DATA_PTR;
int dram_init(void)
{
- gd->ram_size = CONFIG_DDR_MB * 1024 * 1024;
+ gd->ram_size = (ulong)(CONFIG_DDR_MB * 1024 * 1024);
return 0;
}
--
1.7.9.5
More information about the U-Boot
mailing list