summaryrefslogtreecommitdiffstats
path: root/ShellPkg/Library
diff options
context:
space:
mode:
authorKrzysztof Koch <krzysztof.koch@arm.com>2019-07-18 18:05:00 -0700
committerJaben Carsey <jaben.carsey@intel.com>2019-07-19 08:33:00 -0700
commit795e706f745670724c2aaf94e99236b0172aed05 (patch)
treef60ea3119cd5cd0876940aef2d747e283509b6f8 /ShellPkg/Library
parent9cb5bcce9aa3ac24bceb3a9020e84a733e25fe40 (diff)
downloadedk2-795e706f745670724c2aaf94e99236b0172aed05.tar.gz
edk2-795e706f745670724c2aaf94e99236b0172aed05.tar.bz2
edk2-795e706f745670724c2aaf94e99236b0172aed05.zip
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>
Diffstat (limited to 'ShellPkg/Library')
-rw-r--r--ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Iort/IortParser.c58
1 files changed, 14 insertions, 44 deletions
diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Iort/IortParser.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Iort/IortParser.c
index 93f78e1a97..0461205b4f 100644
--- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Iort/IortParser.c
+++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Iort/IortParser.c
@@ -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.
@@ -211,48 +223,6 @@ STATIC CONST ACPI_PARSER IortNodePmcgParser[] = {
};
/**
- 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.
@param [in] Ptr Pointer to the start of the IORT Table.