ShellPkg: acpiview: DBG2: 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:02 -07:00 committed by Jaben Carsey
parent 2a219e196d
commit 8ff68cd5e4
1 changed files with 16 additions and 46 deletions

View File

@ -27,7 +27,7 @@ STATIC CONST UINT16* AddrSizeOffset;
STATIC ACPI_DESCRIPTION_HEADER_INFO AcpiHdrInfo;
/**
This function Validates the NameSpace string length.
This function validates the NameSpace string length.
@param [in] Ptr Pointer to the start of the buffer.
@param [in] Context Pointer to context specific information e.g. this
@ -39,22 +39,21 @@ EFIAPI
ValidateNameSpaceStrLen (
IN UINT8* Ptr,
IN VOID* Context
);
)
{
UINT16 NameSpaceStrLen;
/**
This function parses the debug device information structure.
NameSpaceStrLen = *(UINT16*)Ptr;
@param [in] Ptr Pointer to the start of the buffer.
@param [out] Length Pointer in which the length of the debug
device information is returned.
**/
STATIC
VOID
EFIAPI
DumpDbgDeviceInfo (
IN UINT8* Ptr,
OUT UINT32* Length
if (NameSpaceStrLen < 2) {
IncrementErrorCount ();
Print (
L"\nERROR: NamespaceString Length = %d. If no Namespace device exists, " \
L"NamespaceString[] must contain a period '.'",
NameSpaceStrLen
);
}
}
/// An ACPI_PARSER array describing the ACPI DBG2 table.
STATIC CONST ACPI_PARSER Dbg2Parser[] = {
@ -91,35 +90,6 @@ STATIC CONST ACPI_PARSER DbgDevInfoParser[] = {
(VOID**)&AddrSizeOffset, NULL, NULL}
};
/**
This function validates the NameSpace string length.
@param [in] Ptr Pointer to the start of the buffer.
@param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header.
**/
STATIC
VOID
EFIAPI
ValidateNameSpaceStrLen (
IN UINT8* Ptr,
IN VOID* Context
)
{
UINT16 NameSpaceStrLen;
NameSpaceStrLen = *(UINT16*)Ptr;
if (NameSpaceStrLen < 2) {
IncrementErrorCount ();
Print (
L"\nERROR: NamespaceString Length = %d. If no Namespace device exists,\n"
L" then NamespaceString[] must contain a period '.'",
NameSpaceStrLen
);
}
}
/**
This function parses the debug device information structure.