]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ShellPkg: acpiview: IORT: Remove redundant forward declarations
authorKrzysztof Koch <krzysztof.koch@arm.com>
Fri, 19 Jul 2019 01:05:00 +0000 (18:05 -0700)
committerJaben Carsey <jaben.carsey@intel.com>
Fri, 19 Jul 2019 15:33:00 +0000 (08:33 -0700)
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>
ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Iort/IortParser.c

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