From d7612e97651b75ba2d157ca89bd108c5172ab2c6 Mon Sep 17 00:00:00 2001 From: Nico Huber Date: Thu, 11 Jan 2024 18:50:50 +0100 Subject: tree: Use accessor functions for struct region fields Always use the high-level API region_offset() and region_sz() functions. This excludes the internal `region.c` code as well as unit tests. FIT payload support was also skipped, as it seems it never tried to use the API and would need a bigger overhaul. Change-Id: Iaae116a1ab2da3b2ea2a5ebcd0c300b238582834 Signed-off-by: Nico Huber Reviewed-on: https://review.coreboot.org/c/coreboot/+/79904 Reviewed-by: Arthur Heymans Tested-by: build bot (Jenkins) Reviewed-by: Felix Singer --- src/cpu/x86/smm/smm_module_loader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/cpu/x86') diff --git a/src/cpu/x86/smm/smm_module_loader.c b/src/cpu/x86/smm/smm_module_loader.c index f827e7b28f..d965593c55 100644 --- a/src/cpu/x86/smm/smm_module_loader.c +++ b/src/cpu/x86/smm/smm_module_loader.c @@ -363,7 +363,7 @@ static int append_and_check_region(const struct region smram, { unsigned int region_counter = 0; for (; region_counter < SMM_REGIONS_ARRAY_SIZE; region_counter++) - if (region_list[region_counter].size == 0) + if (region_sz(®ion_list[region_counter]) == 0) break; if (region_counter >= SMM_REGIONS_ARRAY_SIZE) { -- cgit v1.2.3