From 56ed0bee8697a56b08ecfac0b8cb8a9cc312592a Mon Sep 17 00:00:00 2001 From: Arthur Heymans Date: Wed, 30 Mar 2022 13:34:38 +0200 Subject: [PATCH] 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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/63203 Tested-by: build bot (Jenkins) Reviewed-by: Elyes Haouas --- src/drivers/intel/fsp1_1/hob.c | 25 +-------------------- src/drivers/intel/fsp1_1/include/fsp/util.h | 6 ----- 2 files changed, 1 insertion(+), 30 deletions(-) diff --git a/src/drivers/intel/fsp1_1/hob.c b/src/drivers/intel/fsp1_1/hob.c index 076dd5f768..bba32d125c 100644 --- a/src/drivers/intel/fsp1_1/hob.c +++ b/src/drivers/intel/fsp1_1/hob.c @@ -24,7 +24,7 @@ void *get_hob_list(void) } /* 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 @@ void *get_next_hob(uint16_t type, const void *hob_start) 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) { @@ -65,14 +59,6 @@ void *get_next_guid_hob(const EFI_GUID *guid, const void *hob_start) return hob.Raw; } -/* - * 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. */ @@ -90,15 +76,6 @@ void *get_next_resource_hob(const EFI_GUID *guid, const void *hob_start) 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 e1fb59605a..0c9a1fad2f 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_early_init(FSP_INFO_HEADER *fsp_info); 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 @@ extern void *FspHobListPtr; #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);