Paul Fagerburg has submitted this change. ( https://review.coreboot.org/c/coreboot/+/63203 )
Change subject: drivers/intel/fsp1_1: Reduce scope of functions ......................................................................
drivers/intel/fsp1_1: Reduce scope of functions
Reduce scope of get_next_hob and drop unused functions.
Change-Id: I81007295ed2d1592c4d829cbb277c0726d89ea4b Signed-off-by: Arthur Heymans arthur@aheymans.xyz Reviewed-on: https://review.coreboot.org/c/coreboot/+/63203 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Elyes Haouas ehaouas@noos.fr --- M src/drivers/intel/fsp1_1/hob.c M src/drivers/intel/fsp1_1/include/fsp/util.h 2 files changed, 1 insertion(+), 30 deletions(-)
Approvals: build bot (Jenkins): Verified Elyes Haouas: Looks good to me, approved
diff --git a/src/drivers/intel/fsp1_1/hob.c b/src/drivers/intel/fsp1_1/hob.c index 076dd5f..bba32d1 100644 --- a/src/drivers/intel/fsp1_1/hob.c +++ b/src/drivers/intel/fsp1_1/hob.c @@ -24,7 +24,7 @@ }
/* Returns the next instance of a HOB type from the starting HOB. */ -void *get_next_hob(uint16_t type, const void *hob_start) +static void *get_next_hob(uint16_t type, const void *hob_start) { EFI_PEI_HOB_POINTERS hob;
@@ -44,12 +44,6 @@ return NULL; }
-/* Returns the first instance of a HOB type among the whole HOB list. */ -void *get_first_hob(uint16_t type) -{ - return get_next_hob(type, get_hob_list()); -} - /* Returns the next instance of the matched GUID HOB from the starting HOB. */ void *get_next_guid_hob(const EFI_GUID *guid, const void *hob_start) { @@ -66,14 +60,6 @@ }
/* - * Returns the first instance of the matched GUID HOB among the whole HOB list. - */ -void *get_first_guid_hob(const EFI_GUID *guid) -{ - return get_next_guid_hob(guid, get_hob_list()); -} - -/* * Returns the next instance of the matching resource HOB from the starting HOB. */ void *get_next_resource_hob(const EFI_GUID *guid, const void *hob_start) @@ -90,15 +76,6 @@ return hob.Raw; }
-/* - * Returns the first instance of the matching resource HOB among the whole HOB - * list. - */ -void *get_first_resource_hob(const EFI_GUID *guid) -{ - return get_next_resource_hob(guid, get_hob_list()); -} - static void print_hob_mem_attributes(void *hob_ptr) { EFI_MEMORY_TYPE hob_mem_type; diff --git a/src/drivers/intel/fsp1_1/include/fsp/util.h b/src/drivers/intel/fsp1_1/include/fsp/util.h index e1fb596..0c9a1fa 100644 --- a/src/drivers/intel/fsp1_1/include/fsp/util.h +++ b/src/drivers/intel/fsp1_1/include/fsp/util.h @@ -24,10 +24,7 @@ void fsp_notify(u32 phase); void print_hob_type_structure(u16 hob_type, void *hob_list_ptr); void print_fsp_info(FSP_INFO_HEADER *fsp_header); -void *get_next_type_guid_hob(UINT16 type, const EFI_GUID *guid, - const void *hob_start); void *get_next_resource_hob(const EFI_GUID *guid, const void *hob_start); -void *get_first_resource_hob(const EFI_GUID *guid); void fsp_display_upd_value(const char *name, uint32_t size, uint64_t old, uint64_t new); void report_fsp_output(void); @@ -80,10 +77,7 @@ #endif
void *get_hob_list(void); -void *get_next_hob(uint16_t type, const void *hob_start); -void *get_first_hob(uint16_t type); void *get_next_guid_hob(const EFI_GUID *guid, const void *hob_start); -void *get_first_guid_hob(const EFI_GUID *guid);
asmlinkage void chipset_teardown_car_main(void);