From 8387400a7b37bd99bcf24a26d87d063566b5c091 Mon Sep 17 00:00:00 2001 From: Felix Held Date: Fri, 22 Mar 2024 17:12:50 +0100 Subject: soc/amd/common/cpu/noncar/memmap: make local variables const Signed-off-by: Felix Held Change-Id: If3424df80655a150f27c7296a5683b528873816b Reviewed-on: https://review.coreboot.org/c/coreboot/+/81390 Tested-by: build bot (Jenkins) Reviewed-by: Matt DeVillier Reviewed-by: Marshall Dawson --- src/soc/amd/common/block/cpu/noncar/memmap.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/soc/amd') diff --git a/src/soc/amd/common/block/cpu/noncar/memmap.c b/src/soc/amd/common/block/cpu/noncar/memmap.c index 2aaba83039..488c209414 100644 --- a/src/soc/amd/common/block/cpu/noncar/memmap.c +++ b/src/soc/amd/common/block/cpu/noncar/memmap.c @@ -36,13 +36,10 @@ static const struct memmap_early_dram *memmap_get_early_dram_usage(void) /* report SoC memory map up to cbmem_top */ void read_lower_soc_memmap_resources(struct device *dev, unsigned long *idx) { - uint32_t mem_usable = (uintptr_t)cbmem_top(); - - uintptr_t early_reserved_dram_start, early_reserved_dram_end; + const uint32_t mem_usable = (uintptr_t)cbmem_top(); const struct memmap_early_dram *e = memmap_get_early_dram_usage(); - - early_reserved_dram_start = e->base; - early_reserved_dram_end = e->base + e->size; + const uintptr_t early_reserved_dram_start = e->base; + const uintptr_t early_reserved_dram_end = e->base + e->size; /* 0x0 - 0x9ffff */ ram_range(dev, (*idx)++, 0, 0xa0000); -- cgit v1.2.3