]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ShellPkg: acpiview: SPCR: Remove redundant forward declaration
authorKrzysztof Koch <krzysztof.koch@arm.com>
Fri, 19 Jul 2019 01:04:57 +0000 (18:04 -0700)
committerJaben Carsey <jaben.carsey@intel.com>
Fri, 19 Jul 2019 15:32:49 +0000 (08:32 -0700)
Reposition blocks of code to remove redundant forward function
declarations in order to reduce the code size.

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/Spcr/SpcrParser.c

index 1974a9c046e4a3bccccc55cf758184af097b2420..3b06b05dee8c056c6e009b9e485ccd35d4194e95 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   SPCR table parser\r
 \r
-  Copyright (c) 2016 - 2018, ARM Limited. All rights reserved.\r
+  Copyright (c) 2016 - 2019, ARM Limited. All rights reserved.\r
   SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
   @par Reference(s):\r
 // Local variables\r
 STATIC ACPI_DESCRIPTION_HEADER_INFO AcpiHdrInfo;\r
 \r
-/**\r
-  This function validates the Interrupt Type.\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
-ValidateInterruptType (\r
-  IN UINT8* Ptr,\r
-  IN VOID*  Context\r
-  );\r
-\r
-/**\r
-  This function validates the Irq.\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
-ValidateIrq (\r
-  IN UINT8* Ptr,\r
-  IN VOID*  Context\r
-  );\r
-\r
-/**\r
-  An ACPI_PARSER array describing the ACPI SPCR Table.\r
-**/\r
-STATIC CONST ACPI_PARSER SpcrParser[] = {\r
-  PARSE_ACPI_HEADER (&AcpiHdrInfo),\r
-  {L"Interface Type", 1, 36, L"%d", NULL, NULL, NULL, NULL},\r
-  {L"Reserved", 3, 37, L"%x %x %x", Dump3Chars, NULL, NULL, NULL},\r
-  {L"Base Address", 12, 40, NULL, DumpGas, NULL, NULL, NULL},\r
-  {L"Interrupt Type", 1, 52, L"%d", NULL, NULL, ValidateInterruptType, NULL},\r
-  {L"IRQ", 1, 53, L"%d", NULL, NULL, ValidateIrq, NULL},\r
-  {L"Global System Interrupt", 4, 54, L"0x%x", NULL, NULL, NULL, NULL},\r
-  {L"Baud Rate", 1, 58, L"%d", NULL, NULL, NULL, NULL},\r
-  {L"Parity", 1, 59, L"%d", NULL, NULL, NULL, NULL},\r
-  {L"Stop Bits", 1, 60, L"%d", NULL, NULL, NULL, NULL},\r
-  {L"Flow Control", 1, 61, L"0x%x", NULL, NULL, NULL, NULL},\r
-  {L"Terminal Type", 1, 62, L"%d", NULL, NULL, NULL, NULL},\r
-  {L"Reserved", 1, 63, L"%x", NULL, NULL, NULL, NULL},\r
-\r
-  {L"PCI Device ID", 2, 64, L"0x%x", NULL, NULL, NULL, NULL},\r
-  {L"PCI Vendor ID", 2, 66, L"0x%x", NULL, NULL, NULL, NULL},\r
-  {L"PCI Bus Number", 1, 68, L"0x%x", NULL, NULL, NULL, NULL},\r
-  {L"PCI Device Number", 1, 69, L"0x%x", NULL, NULL, NULL, NULL},\r
-  {L"PCI Function Number", 1, 70, L"0x%x", NULL, NULL, NULL, NULL},\r
-  {L"PCI Flags", 4, 71, L"0x%x", NULL, NULL, NULL, NULL},\r
-  {L"PCI Segment", 1, 75, L"0x%x", NULL, NULL, NULL, NULL},\r
-  {L"Reserved", 4, 76, L"%x", NULL, NULL, NULL, NULL}\r
-};\r
-\r
 /**\r
   This function validates the Interrupt Type.\r
 \r
@@ -137,6 +79,34 @@ ValidateIrq (
 #endif\r
 }\r
 \r
+/**\r
+  An ACPI_PARSER array describing the ACPI SPCR Table.\r
+**/\r
+STATIC CONST ACPI_PARSER SpcrParser[] = {\r
+  PARSE_ACPI_HEADER (&AcpiHdrInfo),\r
+  {L"Interface Type", 1, 36, L"%d", NULL, NULL, NULL, NULL},\r
+  {L"Reserved", 3, 37, L"%x %x %x", Dump3Chars, NULL, NULL, NULL},\r
+  {L"Base Address", 12, 40, NULL, DumpGas, NULL, NULL, NULL},\r
+  {L"Interrupt Type", 1, 52, L"%d", NULL, NULL, ValidateInterruptType, NULL},\r
+  {L"IRQ", 1, 53, L"%d", NULL, NULL, ValidateIrq, NULL},\r
+  {L"Global System Interrupt", 4, 54, L"0x%x", NULL, NULL, NULL, NULL},\r
+  {L"Baud Rate", 1, 58, L"%d", NULL, NULL, NULL, NULL},\r
+  {L"Parity", 1, 59, L"%d", NULL, NULL, NULL, NULL},\r
+  {L"Stop Bits", 1, 60, L"%d", NULL, NULL, NULL, NULL},\r
+  {L"Flow Control", 1, 61, L"0x%x", NULL, NULL, NULL, NULL},\r
+  {L"Terminal Type", 1, 62, L"%d", NULL, NULL, NULL, NULL},\r
+  {L"Reserved", 1, 63, L"%x", NULL, NULL, NULL, NULL},\r
+\r
+  {L"PCI Device ID", 2, 64, L"0x%x", NULL, NULL, NULL, NULL},\r
+  {L"PCI Vendor ID", 2, 66, L"0x%x", NULL, NULL, NULL, NULL},\r
+  {L"PCI Bus Number", 1, 68, L"0x%x", NULL, NULL, NULL, NULL},\r
+  {L"PCI Device Number", 1, 69, L"0x%x", NULL, NULL, NULL, NULL},\r
+  {L"PCI Function Number", 1, 70, L"0x%x", NULL, NULL, NULL, NULL},\r
+  {L"PCI Flags", 4, 71, L"0x%x", NULL, NULL, NULL, NULL},\r
+  {L"PCI Segment", 1, 75, L"0x%x", NULL, NULL, NULL, NULL},\r
+  {L"Reserved", 4, 76, L"%x", NULL, NULL, NULL, NULL}\r
+};\r
+\r
 /**\r
   This function parses the ACPI SPCR table.\r
   When trace is enabled this function parses the SPCR table and\r