From patchwork Thu Mar 14 08:09:21 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Babic X-Patchwork-Id: 227459 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 9B6B52C00A0 for ; Thu, 14 Mar 2013 19:09:53 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 3D2A74A177; Thu, 14 Mar 2013 09:09:52 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id L4UkiHtugHEQ; Thu, 14 Mar 2013 09:09:51 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 681354A16B; Thu, 14 Mar 2013 09:09:50 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id E60CE4A16B for ; Thu, 14 Mar 2013 09:09:47 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2mV2r72HoGta for ; Thu, 14 Mar 2013 09:09:47 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from smtpi3.ngi.it (smtpi3.ngi.it [88.149.128.33]) by theia.denx.de (Postfix) with ESMTP id 5FDA14A16A for ; Thu, 14 Mar 2013 09:09:45 +0100 (CET) Received: from babic.homelinux.org (88-149-182-160.v4.ngi.it [88.149.182.160]) by smtpi3.ngi.it (Postfix) with ESMTP id 785AE318804; Thu, 14 Mar 2013 09:09:45 +0100 (CET) Received: from localhost (mail.babic.homelinux.org [127.0.0.1]) by babic.homelinux.org (Postfix) with ESMTP id 4FF3F45402C4; Thu, 14 Mar 2013 09:09:45 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at babic.homelinux.org Received: from babic.homelinux.org ([127.0.0.1]) by localhost (mail.babic.homelinux.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7Nh5vhomgYTY; Thu, 14 Mar 2013 09:09:43 +0100 (CET) Received: from papero.lan (papero.lan [192.168.2.247]) by babic.homelinux.org (Postfix) with ESMTP id B22F545401D1; Thu, 14 Mar 2013 09:09:42 +0100 (CET) From: Stefano Babic To: u-boot@lists.denx.de Date: Thu, 14 Mar 2013 09:09:21 +0100 Message-Id: <1363248561-11974-1-git-send-email-sbabic@denx.de> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1363215553-27684-2-git-send-email-festevam@gmail.com> References: <1363215553-27684-2-git-send-email-festevam@gmail.com> Cc: "fabio.estevam@freescale.com" Subject: [U-Boot] [PATCH V4] nitrogen: Use unsigned long to specify the total RAM size X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de From: "fabio.estevam@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 Signed-off-by: Fabio Estevam Signed-off-by: Stefano Babic --- Changes since V2: - 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..229c237 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; }