]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Slit/SlitParser.c
ShellPkg: Apply uncrustify changes
[mirror_edk2.git] / ShellPkg / Library / UefiShellAcpiViewCommandLib / Parsers / Slit / SlitParser.c
index e4625ee8b13907893a9b6990ecb956baf91cc3b9..71cc12cc2b7d99599be904158dc5620edbe08807 100644 (file)
 #include "AcpiTableParser.h"\r
 \r
 // Local Variables\r
-STATIC CONST UINT64SlitSystemLocalityCount;\r
-STATIC ACPI_DESCRIPTION_HEADER_INFO AcpiHdrInfo;\r
+STATIC CONST UINT64                  *SlitSystemLocalityCount;\r
+STATIC ACPI_DESCRIPTION_HEADER_INFO  AcpiHdrInfo;\r
 \r
 /**\r
   An ACPI_PARSER array describing the ACPI SLIT table.\r
 **/\r
-STATIC CONST ACPI_PARSER SlitParser[] = {\r
+STATIC CONST ACPI_PARSER  SlitParser[] = {\r
   PARSE_ACPI_HEADER (&AcpiHdrInfo),\r
-  {L"Number of System Localities", 8, 36, L"0x%lx", NULL,\r
-   (VOID**)&SlitSystemLocalityCount, NULL, NULL}\r
+  { L"Number of System Localities",   8,     36, L"0x%lx", NULL,\r
+    (VOID **)&SlitSystemLocalityCount,NULL,  NULL }\r
 };\r
 \r
 /**\r
   Macro to get the value of a System Locality\r
 **/\r
-#define SLIT_ELEMENT(Ptr, i, j) *(Ptr + (i * LocalityCount) + j)\r
+#define SLIT_ELEMENT(Ptr, i, j)  *(Ptr + (i * LocalityCount) + j)\r
 \r
 /**\r
   This function parses the ACPI SLIT table.\r
@@ -50,18 +50,18 @@ STATIC CONST ACPI_PARSER SlitParser[] = {
 VOID\r
 EFIAPI\r
 ParseAcpiSlit (\r
-  IN BOOLEAN Trace,\r
-  IN UINT8*  Ptr,\r
-  IN UINT32  AcpiTableLength,\r
-  IN UINT8   AcpiTableRevision\r
+  IN BOOLEAN  Trace,\r
+  IN UINT8    *Ptr,\r
+  IN UINT32   AcpiTableLength,\r
+  IN UINT8    AcpiTableRevision\r
   )\r
 {\r
-  UINT32 Offset;\r
-  UINT32 Count;\r
-  UINT32 Index;\r
-  UINT32 LocalityCount;\r
-  UINT8LocalityPtr;\r
-  CHAR16 Buffer[80];  // Used for AsciiName param of ParseAcpi\r
+  UINT32  Offset;\r
+  UINT32  Count;\r
+  UINT32  Index;\r
+  UINT32  LocalityCount;\r
+  UINT8   *LocalityPtr;\r
+  CHAR16  Buffer[80]; // Used for AsciiName param of ParseAcpi\r
 \r
   if (!Trace) {\r
     return;\r
@@ -103,8 +103,8 @@ ParseAcpiSlit (
     IncrementErrorCount ();\r
     Print (\r
       L"ERROR: The Number of System Localities provided can't be represented " \\r
-        L"in the SLIT table. SlitSystemLocalityCount = %ld. " \\r
-        L"MaxLocalityCountAllowed = %d.\n",\r
+      L"in the SLIT table. SlitSystemLocalityCount = %ld. " \\r
+      L"MaxLocalityCountAllowed = %d.\n",\r
       *SlitSystemLocalityCount,\r
       MAX_UINT16\r
       );\r
@@ -118,7 +118,7 @@ ParseAcpiSlit (
     IncrementErrorCount ();\r
     Print (\r
       L"ERROR: Invalid Number of System Localities. " \\r
-        L"SlitSystemLocalityCount = %ld. AcpiTableLength = %d.\n",\r
+      L"SlitSystemLocalityCount = %ld. AcpiTableLength = %d.\n",\r
       *SlitSystemLocalityCount,\r
       AcpiTableLength\r
       );\r
@@ -144,12 +144,14 @@ ParseAcpiSlit (
     for (Index = 0; Index < LocalityCount; Index++) {\r
       Print (L" (%3d) ", Index);\r
     }\r
+\r
     Print (L"\n");\r
-    for (Count = 0; Count< LocalityCount; Count++) {\r
+    for (Count = 0; Count < LocalityCount; Count++) {\r
       Print (L" (%3d) ", Count);\r
       for (Index = 0; Index < LocalityCount; Index++) {\r
         Print (L"  %3d  ", SLIT_ELEMENT (LocalityPtr, Count, Index));\r
       }\r
+\r
       Print (L"\n");\r
     }\r
   }\r
@@ -158,23 +160,25 @@ ParseAcpiSlit (
   for (Count = 0; Count < LocalityCount; Count++) {\r
     for (Index = 0; Index < LocalityCount; Index++) {\r
       // Element[x][x] must be equal to 10\r
-      if ((Count == Index) && (SLIT_ELEMENT (LocalityPtr, Count,Index) != 10)) {\r
+      if ((Count == Index) && (SLIT_ELEMENT (LocalityPtr, Count, Index) != 10)) {\r
         IncrementErrorCount ();\r
         Print (\r
           L"ERROR: Diagonal Element[0x%lx][0x%lx] (%3d)."\r
-            L" Normalized Value is not 10\n",\r
+          L" Normalized Value is not 10\n",\r
           Count,\r
           Index,\r
           SLIT_ELEMENT (LocalityPtr, Count, Index)\r
           );\r
       }\r
+\r
       // Element[i][j] must be equal to Element[j][i]\r
       if (SLIT_ELEMENT (LocalityPtr, Count, Index) !=\r
-          SLIT_ELEMENT (LocalityPtr, Index, Count)) {\r
+          SLIT_ELEMENT (LocalityPtr, Index, Count))\r
+      {\r
         IncrementErrorCount ();\r
         Print (\r
           L"ERROR: Relative distances for Element[0x%lx][0x%lx] (%3d) and \n"\r
-           L"Element[0x%lx][0x%lx] (%3d) do not match.\n",\r
+          L"Element[0x%lx][0x%lx] (%3d) do not match.\n",\r
           Count,\r
           Index,\r
           SLIT_ELEMENT (LocalityPtr, Count, Index),\r