From: Venkatesh Yadav Abbarapu Date: Fri, 20 Dec 2024 03:07:42 +0000 (+0530) Subject: common: memtop: Fix the return type for find_ram_top X-Git-Url: http://git.dujemihanovic.xyz/%22http:/www.sics.se/static/%7B%7B?a=commitdiff_plain;h=1b70b6c9cc98290fbd46da09c9f5a95f45121148;p=u-boot.git common: memtop: Fix the return type for find_ram_top As the return type is "int" for find_ram_top() function and returning the "base" which is of phys_addr_t is breaking when the "base" address is 64-bit. So fix this by updating the return type as phys_addr_t. Signed-off-by: Venkatesh Yadav Abbarapu Reviewed-by: Michal Simek Acked-by: Sughosh Ganu Link: https://lore.kernel.org/r/20241220030742.1745984-1-venkatesh.abbarapu@amd.com Signed-off-by: Michal Simek --- diff --git a/common/memtop.c b/common/memtop.c index 841d89e079..bff27d8211 100644 --- a/common/memtop.c +++ b/common/memtop.c @@ -121,8 +121,8 @@ static long region_overlap_check(struct mem_region *mem_rgn, phys_addr_t base, return (i < mem_rgn->count) ? i : -1; } -static int find_ram_top(struct mem_region *free_mem, - struct mem_region *reserved_mem, phys_size_t size) +static phys_addr_t find_ram_top(struct mem_region *free_mem, + struct mem_region *reserved_mem, phys_size_t size) { long i, rgn; phys_addr_t base = 0;