From: Bin Meng Date: Sun, 31 Jan 2021 20:35:58 +0800 Subject: [PATCH v2 02/10] arm: rockchip: Explicitly cast gd->ram_top in dram_init_banksize() In-Reply-To: <20210131123606.20702-1-bmeng.cn@gmail.com> References: <20210131123606.20702-1-bmeng.cn@gmail.com> Message-ID: <20210131123606.20702-3-bmeng.cn@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de From: Bin Meng The min() macro used in dram_init_banksize() requires two elements to compare have the same type. Let's explicitly cast gd->ram_top. Signed-off-by: Bin Meng --- Changes in v2: - new patch: arm: rockchip: Explicitly cast gd->ram_top in dram_init_banksize() arch/arm/mach-rockchip/sdram.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-rockchip/sdram.c b/arch/arm/mach-rockchip/sdram.c index 4c637b7767..c3d5fed7db 100644 --- a/arch/arm/mach-rockchip/sdram.c +++ b/arch/arm/mach-rockchip/sdram.c @@ -37,7 +37,7 @@ struct tos_parameter_t { int dram_init_banksize(void) { size_t top = min((unsigned long)(gd->ram_size + CONFIG_SYS_SDRAM_BASE), - gd->ram_top); + (unsigned long)(gd->ram_top)); #ifdef CONFIG_ARM64 /* Reserve 0x200000 for ATF bl31 */ -- 2.25.1