]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPkg/Library/SemiHostingDebugLib/DebugLib.c
ArmPkg: Apply uncrustify changes
[mirror_edk2.git] / ArmPkg / Library / SemiHostingDebugLib / DebugLib.c
index ae762d8bea626b96059c941a724f95c5bd5d3117..c3ea568dc4c9ad58552b6da6ef9a3d351fe22b80 100644 (file)
@@ -7,7 +7,6 @@
 \r
 **/\r
 \r
 \r
 **/\r
 \r
-\r
 #include <Uefi.h>\r
 #include <Library/DebugLib.h>\r
 #include <Library/PrintLib.h>\r
 #include <Uefi.h>\r
 #include <Library/DebugLib.h>\r
 #include <Library/PrintLib.h>\r
@@ -25,7 +24,7 @@
 // VA_LIST can not initialize to NULL for all compiler, so we use this to\r
 // indicate a null VA_LIST\r
 //\r
 // VA_LIST can not initialize to NULL for all compiler, so we use this to\r
 // indicate a null VA_LIST\r
 //\r
-VA_LIST     mVaListNull;\r
+VA_LIST  mVaListNull;\r
 \r
 /**\r
 \r
 \r
 /**\r
 \r
@@ -49,14 +48,13 @@ DebugPrint (
   ...\r
   )\r
 {\r
   ...\r
   )\r
 {\r
-  VA_LIST         Marker;\r
+  VA_LIST  Marker;\r
 \r
   VA_START (Marker, Format);\r
   DebugVPrint (ErrorLevel, Format, Marker);\r
   VA_END (Marker);\r
 }\r
 \r
 \r
   VA_START (Marker, Format);\r
   DebugVPrint (ErrorLevel, Format, Marker);\r
   VA_END (Marker);\r
 }\r
 \r
-\r
 /**\r
   Prints a debug message to the debug output device if the specified\r
   error level is enabled base on Null-terminated format string and a\r
 /**\r
   Prints a debug message to the debug output device if the specified\r
   error level is enabled base on Null-terminated format string and a\r
@@ -76,13 +74,13 @@ DebugPrint (
 **/\r
 VOID\r
 DebugPrintMarker (\r
 **/\r
 VOID\r
 DebugPrintMarker (\r
-  IN  UINTN         ErrorLevel,\r
-  IN  CONST CHAR8   *Format,\r
-  IN  VA_LIST       VaListMarker,\r
-  IN  BASE_LIST     BaseListMarker\r
+  IN  UINTN        ErrorLevel,\r
+  IN  CONST CHAR8  *Format,\r
+  IN  VA_LIST      VaListMarker,\r
+  IN  BASE_LIST    BaseListMarker\r
   )\r
 {\r
   )\r
 {\r
-  CHAR8    AsciiBuffer[MAX_DEBUG_MESSAGE_LENGTH];\r
+  CHAR8  AsciiBuffer[MAX_DEBUG_MESSAGE_LENGTH];\r
 \r
   //\r
   // If Format is NULL, then ASSERT().\r
 \r
   //\r
   // If Format is NULL, then ASSERT().\r
@@ -92,7 +90,7 @@ DebugPrintMarker (
   //\r
   // Check driver debug mask value and global mask\r
   //\r
   //\r
   // Check driver debug mask value and global mask\r
   //\r
-  if ((ErrorLevel & PcdGet32(PcdDebugPrintErrorLevel)) == 0) {\r
+  if ((ErrorLevel & PcdGet32 (PcdDebugPrintErrorLevel)) == 0) {\r
     return;\r
   }\r
 \r
     return;\r
   }\r
 \r
@@ -108,7 +106,6 @@ DebugPrintMarker (
   SemihostWriteString (AsciiBuffer);\r
 }\r
 \r
   SemihostWriteString (AsciiBuffer);\r
 }\r
 \r
-\r
 /**\r
   Prints a debug message to the debug output device if the specified\r
   error level is enabled.\r
 /**\r
   Prints a debug message to the debug output device if the specified\r
   error level is enabled.\r
@@ -127,15 +124,14 @@ DebugPrintMarker (
 VOID\r
 EFIAPI\r
 DebugVPrint (\r
 VOID\r
 EFIAPI\r
 DebugVPrint (\r
-  IN  UINTN         ErrorLevel,\r
-  IN  CONST CHAR8   *Format,\r
-  IN  VA_LIST       VaListMarker\r
+  IN  UINTN        ErrorLevel,\r
+  IN  CONST CHAR8  *Format,\r
+  IN  VA_LIST      VaListMarker\r
   )\r
 {\r
   DebugPrintMarker (ErrorLevel, Format, VaListMarker, NULL);\r
 }\r
 \r
   )\r
 {\r
   DebugPrintMarker (ErrorLevel, Format, VaListMarker, NULL);\r
 }\r
 \r
-\r
 /**\r
   Prints a debug message to the debug output device if the specified\r
   error level is enabled.\r
 /**\r
   Prints a debug message to the debug output device if the specified\r
   error level is enabled.\r
@@ -156,15 +152,14 @@ DebugVPrint (
 VOID\r
 EFIAPI\r
 DebugBPrint (\r
 VOID\r
 EFIAPI\r
 DebugBPrint (\r
-  IN  UINTN         ErrorLevel,\r
-  IN  CONST CHAR8   *Format,\r
-  IN  BASE_LIST     BaseListMarker\r
+  IN  UINTN        ErrorLevel,\r
+  IN  CONST CHAR8  *Format,\r
+  IN  BASE_LIST    BaseListMarker\r
   )\r
 {\r
   DebugPrintMarker (ErrorLevel, Format, mVaListNull, BaseListMarker);\r
 }\r
 \r
   )\r
 {\r
   DebugPrintMarker (ErrorLevel, Format, mVaListNull, BaseListMarker);\r
 }\r
 \r
-\r
 /**\r
 \r
   Prints an assert message containing a filename, line number, and description.\r
 /**\r
 \r
   Prints an assert message containing a filename, line number, and description.\r
@@ -196,7 +191,7 @@ DebugAssert (
   IN CONST CHAR8  *Description\r
   )\r
 {\r
   IN CONST CHAR8  *Description\r
   )\r
 {\r
-  CHAR8   AsciiBuffer[MAX_DEBUG_MESSAGE_LENGTH];\r
+  CHAR8  AsciiBuffer[MAX_DEBUG_MESSAGE_LENGTH];\r
 \r
   //\r
   // Generate the ASSERT() message in Unicode format\r
 \r
   //\r
   // Generate the ASSERT() message in Unicode format\r
@@ -208,14 +203,13 @@ DebugAssert (
   //\r
   // Generate a Breakpoint, DeadLoop, or NOP based on PCD settings\r
   //\r
   //\r
   // Generate a Breakpoint, DeadLoop, or NOP based on PCD settings\r
   //\r
-  if ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_ASSERT_BREAKPOINT_ENABLED) != 0) {\r
+  if ((PcdGet8 (PcdDebugPropertyMask) & DEBUG_PROPERTY_ASSERT_BREAKPOINT_ENABLED) != 0) {\r
     CpuBreakpoint ();\r
     CpuBreakpoint ();\r
-  } else if ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_ASSERT_DEADLOOP_ENABLED) != 0) {\r
+  } else if ((PcdGet8 (PcdDebugPropertyMask) & DEBUG_PROPERTY_ASSERT_DEADLOOP_ENABLED) != 0) {\r
     CpuDeadLoop ();\r
   }\r
 }\r
 \r
     CpuDeadLoop ();\r
   }\r
 }\r
 \r
-\r
 /**\r
 \r
   Fills a target buffer with PcdDebugClearMemoryValue, and returns the target buffer.\r
 /**\r
 \r
   Fills a target buffer with PcdDebugClearMemoryValue, and returns the target buffer.\r
@@ -248,10 +242,9 @@ DebugClearMemory (
   //\r
   // SetMem() checks for the ASSERT() condition on Length and returns Buffer\r
   //\r
   //\r
   // SetMem() checks for the ASSERT() condition on Length and returns Buffer\r
   //\r
-  return SetMem (Buffer, Length, PcdGet8(PcdDebugClearMemoryValue));\r
+  return SetMem (Buffer, Length, PcdGet8 (PcdDebugClearMemoryValue));\r
 }\r
 \r
 }\r
 \r
-\r
 /**\r
 \r
   Returns TRUE if ASSERT() macros are enabled.\r
 /**\r
 \r
   Returns TRUE if ASSERT() macros are enabled.\r
@@ -269,10 +262,9 @@ DebugAssertEnabled (
   VOID\r
   )\r
 {\r
   VOID\r
   )\r
 {\r
-  return (BOOLEAN) ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED) != 0);\r
+  return (BOOLEAN)((PcdGet8 (PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED) != 0);\r
 }\r
 \r
 }\r
 \r
-\r
 /**\r
 \r
   Returns TRUE if DEBUG()macros are enabled.\r
 /**\r
 \r
   Returns TRUE if DEBUG()macros are enabled.\r
@@ -290,10 +282,9 @@ DebugPrintEnabled (
   VOID\r
   )\r
 {\r
   VOID\r
   )\r
 {\r
-  return (BOOLEAN) ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_PRINT_ENABLED) != 0);\r
+  return (BOOLEAN)((PcdGet8 (PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_PRINT_ENABLED) != 0);\r
 }\r
 \r
 }\r
 \r
-\r
 /**\r
 \r
   Returns TRUE if DEBUG_CODE()macros are enabled.\r
 /**\r
 \r
   Returns TRUE if DEBUG_CODE()macros are enabled.\r
@@ -311,10 +302,9 @@ DebugCodeEnabled (
   VOID\r
   )\r
 {\r
   VOID\r
   )\r
 {\r
-  return (BOOLEAN) ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_CODE_ENABLED) != 0);\r
+  return (BOOLEAN)((PcdGet8 (PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_CODE_ENABLED) != 0);\r
 }\r
 \r
 }\r
 \r
-\r
 /**\r
 \r
   Returns TRUE if DEBUG_CLEAR_MEMORY()macro is enabled.\r
 /**\r
 \r
   Returns TRUE if DEBUG_CLEAR_MEMORY()macro is enabled.\r
@@ -332,5 +322,5 @@ DebugClearMemoryEnabled (
   VOID\r
   )\r
 {\r
   VOID\r
   )\r
 {\r
-  return (BOOLEAN) ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED) != 0);\r
+  return (BOOLEAN)((PcdGet8 (PcdDebugPropertyMask) & DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED) != 0);\r
 }\r
 }\r