From 5c4748b342fafb84dfaf03c3e8187b8e5bf9e3e9 Mon Sep 17 00:00:00 2001 From: Patrick Georgi Date: Mon, 8 Aug 2016 11:43:43 +0200 Subject: vendorcode/amd: Remove dead code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I6b21822d60d379cb8cd21b69c714a437bb7977ce Signed-off-by: Patrick Georgi Found-by: Coverity Scan #1254643 and others Reviewed-on: https://review.coreboot.org/16112 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel Reviewed-by: Kyösti Mälkki --- src/vendorcode/amd/pi/00630F01/binaryPI/AGESA.c | 42 ------------------------- src/vendorcode/amd/pi/00730F01/binaryPI/AGESA.c | 42 ------------------------- 2 files changed, 84 deletions(-) (limited to 'src/vendorcode/amd') diff --git a/src/vendorcode/amd/pi/00630F01/binaryPI/AGESA.c b/src/vendorcode/amd/pi/00630F01/binaryPI/AGESA.c index 7a6851df65..c207d67506 100644 --- a/src/vendorcode/amd/pi/00630F01/binaryPI/AGESA.c +++ b/src/vendorcode/amd/pi/00630F01/binaryPI/AGESA.c @@ -438,13 +438,7 @@ WaitForEcLDN9MailboxCmdAck ( IN AMD_CONFIG_PARAMS *StdHeader ) { - MODULE_ENTRY Dispatcher = NULL; - const AMD_MODULE_HEADER* module = agesawrapper_locate_module(ModuleIdentifier); StdHeader->Func = 0; - return; - if (!module) return; - Dispatcher = module->ModuleDispatcher; - Dispatcher(StdHeader); } /** @@ -459,13 +453,7 @@ ImcSleep ( IN VOID *FchDataPtr ) { - MODULE_ENTRY Dispatcher = NULL; - const AMD_MODULE_HEADER* module = agesawrapper_locate_module(ModuleIdentifier); ((FCH_DATA_BLOCK*)FchDataPtr)->StdHeader->Func = 0; - return; - if (!module) return; - Dispatcher = module->ModuleDispatcher; - Dispatcher(FchDataPtr); } /** @@ -480,13 +468,7 @@ SoftwareDisableImc ( IN VOID *FchDataPtr ) { - MODULE_ENTRY Dispatcher = NULL; - const AMD_MODULE_HEADER* module = agesawrapper_locate_module(ModuleIdentifier); ((FCH_DATA_BLOCK*)FchDataPtr)->StdHeader->Func = 0; - return; - if (!module) return; - Dispatcher = module->ModuleDispatcher; - Dispatcher(FchDataPtr); } /** @@ -501,13 +483,7 @@ ImcEnableSurebootTimer ( IN VOID *FchDataPtr ) { - MODULE_ENTRY Dispatcher = NULL; - const AMD_MODULE_HEADER* module = agesawrapper_locate_module(ModuleIdentifier); ((FCH_DATA_BLOCK*)FchDataPtr)->StdHeader->Func = 0; - return; - if (!module) return; - Dispatcher = module->ModuleDispatcher; - Dispatcher(FchDataPtr); } /** @@ -522,13 +498,7 @@ ImcDisableSurebootTimer ( IN VOID *FchDataPtr ) { - MODULE_ENTRY Dispatcher = NULL; - const AMD_MODULE_HEADER* module = agesawrapper_locate_module(ModuleIdentifier); ((FCH_DATA_BLOCK*)FchDataPtr)->StdHeader->Func = 0; - return; - if (!module) return; - Dispatcher = module->ModuleDispatcher; - Dispatcher(FchDataPtr); } /** @@ -543,13 +513,7 @@ ImcWakeup ( IN VOID *FchDataPtr ) { - MODULE_ENTRY Dispatcher = NULL; - const AMD_MODULE_HEADER* module = agesawrapper_locate_module(ModuleIdentifier); ((FCH_DATA_BLOCK*)FchDataPtr)->StdHeader->Func = 0; - return; - if (!module) return; - Dispatcher = module->ModuleDispatcher; - Dispatcher(FchDataPtr); } /** @@ -564,13 +528,7 @@ ImcIdle ( IN VOID *FchDataPtr ) { - MODULE_ENTRY Dispatcher = NULL; - const AMD_MODULE_HEADER* module = agesawrapper_locate_module(ModuleIdentifier); ((FCH_DATA_BLOCK*)FchDataPtr)->StdHeader->Func = 0; - return; - if (!module) return; - Dispatcher = module->ModuleDispatcher; - Dispatcher(FchDataPtr); } // TODO This has to be removed diff --git a/src/vendorcode/amd/pi/00730F01/binaryPI/AGESA.c b/src/vendorcode/amd/pi/00730F01/binaryPI/AGESA.c index b58107ca78..82744dd0cf 100644 --- a/src/vendorcode/amd/pi/00730F01/binaryPI/AGESA.c +++ b/src/vendorcode/amd/pi/00730F01/binaryPI/AGESA.c @@ -436,13 +436,7 @@ WaitForEcLDN9MailboxCmdAck ( IN AMD_CONFIG_PARAMS *StdHeader ) { - MODULE_ENTRY Dispatcher = NULL; - const AMD_MODULE_HEADER* module = agesawrapper_locate_module(ModuleIdentifier); StdHeader->Func = 0; - return; - if (!module) return; - Dispatcher = module->ModuleDispatcher; - Dispatcher(StdHeader); } /** @@ -457,13 +451,7 @@ ImcSleep ( IN VOID *FchDataPtr ) { - MODULE_ENTRY Dispatcher = NULL; - const AMD_MODULE_HEADER* module = agesawrapper_locate_module(ModuleIdentifier); ((FCH_DATA_BLOCK*)FchDataPtr)->StdHeader->Func = 0; - return; - if (!module) return; - Dispatcher = module->ModuleDispatcher; - Dispatcher(FchDataPtr); } /** @@ -478,13 +466,7 @@ SoftwareDisableImc ( IN VOID *FchDataPtr ) { - MODULE_ENTRY Dispatcher = NULL; - const AMD_MODULE_HEADER* module = agesawrapper_locate_module(ModuleIdentifier); ((FCH_DATA_BLOCK*)FchDataPtr)->StdHeader->Func = 0; - return; - if (!module) return; - Dispatcher = module->ModuleDispatcher; - Dispatcher(FchDataPtr); } /** @@ -499,13 +481,7 @@ ImcEnableSurebootTimer ( IN VOID *FchDataPtr ) { - MODULE_ENTRY Dispatcher = NULL; - const AMD_MODULE_HEADER* module = agesawrapper_locate_module(ModuleIdentifier); ((FCH_DATA_BLOCK*)FchDataPtr)->StdHeader->Func = 0; - return; - if (!module) return; - Dispatcher = module->ModuleDispatcher; - Dispatcher(FchDataPtr); } /** @@ -520,13 +496,7 @@ ImcDisableSurebootTimer ( IN VOID *FchDataPtr ) { - MODULE_ENTRY Dispatcher = NULL; - const AMD_MODULE_HEADER* module = agesawrapper_locate_module(ModuleIdentifier); ((FCH_DATA_BLOCK*)FchDataPtr)->StdHeader->Func = 0; - return; - if (!module) return; - Dispatcher = module->ModuleDispatcher; - Dispatcher(FchDataPtr); } /** @@ -541,13 +511,7 @@ ImcWakeup ( IN VOID *FchDataPtr ) { - MODULE_ENTRY Dispatcher = NULL; - const AMD_MODULE_HEADER* module = agesawrapper_locate_module(ModuleIdentifier); ((FCH_DATA_BLOCK*)FchDataPtr)->StdHeader->Func = 0; - return; - if (!module) return; - Dispatcher = module->ModuleDispatcher; - Dispatcher(FchDataPtr); } /** @@ -562,13 +526,7 @@ ImcIdle ( IN VOID *FchDataPtr ) { - MODULE_ENTRY Dispatcher = NULL; - const AMD_MODULE_HEADER* module = agesawrapper_locate_module(ModuleIdentifier); ((FCH_DATA_BLOCK*)FchDataPtr)->StdHeader->Func = 0; - return; - if (!module) return; - Dispatcher = module->ModuleDispatcher; - Dispatcher(FchDataPtr); } // TODO This has to be removed -- cgit v1.2.3