ShellPkg: acpiview: IORT: Remove redundant forward declarations

Remove redundant forward function declarations by repositioning
blocks of code. This way the code structure is consistent across
ACPI table parsers and the code becomes more concise.

Signed-off-by: Krzysztof Koch <krzysztof.koch@arm.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
Reviewed-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
This commit is contained in:
Krzysztof Koch 2019-07-18 18:05:00 -07:00 committed by Jaben Carsey
parent 9cb5bcce9a
commit 795e706f74
1 changed files with 14 additions and 44 deletions

View File

@ -45,7 +45,13 @@ EFIAPI
ValidateItsIdMappingCount (
IN UINT8* Ptr,
IN VOID* Context
);
)
{
if (*(UINT32*)Ptr != 0) {
IncrementErrorCount ();
Print (L"\nERROR: IORT ID Mapping count must be zero.");
}
}
/**
This function validates the ID Mapping array offset for the ITS node.
@ -60,7 +66,13 @@ EFIAPI
ValidateItsIdArrayReference (
IN UINT8* Ptr,
IN VOID* Context
);
)
{
if (*(UINT32*)Ptr != 0) {
IncrementErrorCount ();
Print (L"\nERROR: IORT ID Mapping offset must be zero.");
}
}
/**
Helper Macro for populating the IORT Node header in the ACPI_PARSER array.
@ -210,48 +222,6 @@ STATIC CONST ACPI_PARSER IortNodePmcgParser[] = {
{L"Node reference", 4, 28, L"0x%x", NULL, NULL, NULL, NULL},
};
/**
This function validates the ID Mapping array count for the ITS node.
@param [in] Ptr Pointer to the start of the field data.
@param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header.
**/
STATIC
VOID
EFIAPI
ValidateItsIdMappingCount (
IN UINT8* Ptr,
IN VOID* Context
)
{
if (*(UINT32*)Ptr != 0) {
IncrementErrorCount ();
Print (L"\nERROR: IORT ID Mapping count must be zero.");
}
}
/**
This function validates the ID Mapping array offset for the ITS node.
@param [in] Ptr Pointer to the start of the field data.
@param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header.
**/
STATIC
VOID
EFIAPI
ValidateItsIdArrayReference (
IN UINT8* Ptr,
IN VOID* Context
)
{
if (*(UINT32*)Ptr != 0) {
IncrementErrorCount ();
Print (L"\nERROR: IORT ID Mapping offset must be zero.");
}
}
/**
This function parses the IORT Node Id Mapping array.