From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A7F18ECAAD3 for ; Fri, 9 Sep 2022 15:34:00 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8BA9784B89; Fri, 9 Sep 2022 17:33:19 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="FyHyFmYG"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D9B8284928; Fri, 9 Sep 2022 17:33:06 +0200 (CEST) Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 90C8384B4F for ; Fri, 9 Sep 2022 17:33:01 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=pali@kernel.org Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 6F73062055; Fri, 9 Sep 2022 15:33:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 18C81C43148; Fri, 9 Sep 2022 15:33:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1662737580; bh=T9R4d/1lQsgozt2ngBMIA4Bw8QsgFM0G+uE1dIudtfQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=FyHyFmYG8JWzGpyNTR4NOz8AH6r36POz0wCBIgfnif7rGAoLV2IeMeCmWEBuI7M3U piKKDTd3PYUiQWrN74cohF0BkTdoQZanOeiChDNzjdsaJ0H7usRCcvHfs/jgkKyHtY 9kDrpLvOn47utxV0B0cySHws0ZmO3+lPZ5qYgqUBky9+DNp4k4Do283O0SFFkjruqS UAKkyybt6DBbxwRC8dFAKHheAbYTP4GjTRnAXX+nD4Jy6jBz6h594+aHiPBgcvgvP4 ULjPYVdxmX4yqu5gge8DBArDsDAQycxH6yMa8EAkMd3SPxlTXsH7PBiNRxxizYxShd pMB3wir8D75TQ== Received: by pali.im (Postfix) id 9E7591EC7; Fri, 9 Sep 2022 17:32:57 +0200 (CEST) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: u-boot@lists.denx.de, =?UTF-8?q?Marek=20Beh=C3=BAn?= , Peng Fan , Tom Rini Subject: [PATCH 4/9] board_f: Fix printing gd->ram_size and gd->ram_top Date: Fri, 9 Sep 2022 17:32:41 +0200 Message-Id: <20220909153246.8455-5-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20220909153246.8455-1-pali@kernel.org> References: <20220909153246.8455-1-pali@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean Members gd->ram_size and gd->ram_top are of type phys_addr_t which does not have to fit into ulong type. So cast them into unsigned long long. Fixes: 37dc958947ed ("global_data.h: Change ram_top type to phys_addr_t") Signed-off-by: Pali Rohár --- common/board_f.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/board_f.c b/common/board_f.c index 15e442a0cf33..9e34fbee147e 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -325,7 +325,7 @@ static int setup_dest_addr(void) /* * Ram is setup, size stored in gd !! */ - debug("Ram size: %08lX\n", (ulong)gd->ram_size); + debug("Ram size: %08llX\n", (unsigned long long)gd->ram_size); #if defined(CONFIG_SYS_MEM_TOP_HIDE) /* * Subtract specified amount of memory to hide so that it won't @@ -345,7 +345,7 @@ static int setup_dest_addr(void) gd->ram_top = gd->ram_base + get_effective_memsize(); gd->ram_top = board_get_usable_ram_top(gd->mon_len); gd->relocaddr = gd->ram_top; - debug("Ram top: %08lX\n", (ulong)gd->ram_top); + debug("Ram top: %08llX\n", (unsigned long long)gd->ram_top); #if defined(CONFIG_MP) && (defined(CONFIG_MPC86xx) || defined(CONFIG_E500)) /* * We need to make sure the location we intend to put secondary core -- 2.20.1