]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Library/SmmPerformanceLib/SmmPerformanceLib.c
MdeModulePkg: Apply uncrustify changes
[mirror_edk2.git] / MdeModulePkg / Library / SmmPerformanceLib / SmmPerformanceLib.c
index c3fa79b2de926b2589f2aaff2e072a54fa2924bb..623f8a978cdc64898455977c721e91ae30c5c1e7 100644 (file)
@@ -11,7 +11,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 \r
 **/\r
 \r
-\r
 #include <Guid/PerformanceMeasurement.h>\r
 \r
 #include <Library/PerformanceLib.h>\r
@@ -41,8 +40,7 @@ SmmPerformanceLibConstructor (
   IN EFI_SYSTEM_TABLE  *SystemTable\r
   )\r
 {\r
-\r
-  mPerformanceMeasurementEnabled =  (BOOLEAN) ((PcdGet8(PcdPerformanceLibraryPropertyMask) & PERFORMANCE_LIBRARY_PROPERTY_MEASUREMENT_ENABLED) != 0);\r
+  mPerformanceMeasurementEnabled =  (BOOLEAN)((PcdGet8 (PcdPerformanceLibraryPropertyMask) & PERFORMANCE_LIBRARY_PROPERTY_MEASUREMENT_ENABLED) != 0);\r
 \r
   return EFI_SUCCESS;\r
 }\r
@@ -61,14 +59,14 @@ GetPerformanceMeasurementProtocol (
   VOID\r
   )\r
 {\r
-  EFI_STATUS                Status;\r
-  EDKII_PERFORMANCE_MEASUREMENT_PROTOCOL   *PerformanceMeasurement;\r
+  EFI_STATUS                              Status;\r
+  EDKII_PERFORMANCE_MEASUREMENT_PROTOCOL  *PerformanceMeasurement;\r
 \r
   if (mPerformanceMeasurement != NULL) {\r
     return EFI_SUCCESS;\r
   }\r
 \r
-  Status = gSmst->SmmLocateProtocol (&gEdkiiSmmPerformanceMeasurementProtocolGuid, NULL, (VOID **) &PerformanceMeasurement);\r
+  Status = gSmst->SmmLocateProtocol (&gEdkiiSmmPerformanceMeasurementProtocolGuid, NULL, (VOID **)&PerformanceMeasurement);\r
   if (!EFI_ERROR (Status)) {\r
     ASSERT (PerformanceMeasurement != NULL);\r
     //\r
@@ -77,6 +75,7 @@ GetPerformanceMeasurementProtocol (
     mPerformanceMeasurement = PerformanceMeasurement;\r
     return EFI_SUCCESS;\r
   }\r
+\r
   return EFI_NOT_FOUND;\r
 }\r
 \r
@@ -112,8 +111,8 @@ StartPerformanceMeasurementEx (
   IN UINT32       Identifier\r
   )\r
 {\r
-  EFI_STATUS    Status;\r
-  CONST CHAR8*  String;\r
+  EFI_STATUS   Status;\r
+  CONST CHAR8  *String;\r
 \r
   Status = GetPerformanceMeasurementProtocol ();\r
   if (EFI_ERROR (Status)) {\r
@@ -134,7 +133,7 @@ StartPerformanceMeasurementEx (
     ASSERT (FALSE);\r
   }\r
 \r
-  return (RETURN_STATUS) Status;\r
+  return (RETURN_STATUS)Status;\r
 }\r
 \r
 /**\r
@@ -171,8 +170,8 @@ EndPerformanceMeasurementEx (
   IN UINT32       Identifier\r
   )\r
 {\r
-  EFI_STATUS    Status;\r
-  CONST CHAR8*  String;\r
+  EFI_STATUS   Status;\r
+  CONST CHAR8  *String;\r
 \r
   Status = GetPerformanceMeasurementProtocol ();\r
   if (EFI_ERROR (Status)) {\r
@@ -193,7 +192,7 @@ EndPerformanceMeasurementEx (
     ASSERT (FALSE);\r
   }\r
 \r
-  return (RETURN_STATUS) Status;\r
+  return (RETURN_STATUS)Status;\r
 }\r
 \r
 /**\r
@@ -240,13 +239,13 @@ EndPerformanceMeasurementEx (
 UINTN\r
 EFIAPI\r
 GetPerformanceMeasurementEx (\r
-  IN  UINTN       LogEntryKey,\r
-  OUT CONST VOID  **Handle,\r
-  OUT CONST CHAR8 **Token,\r
-  OUT CONST CHAR8 **Module,\r
-  OUT UINT64      *StartTimeStamp,\r
-  OUT UINT64      *EndTimeStamp,\r
-  OUT UINT32      *Identifier\r
+  IN  UINTN        LogEntryKey,\r
+  OUT CONST VOID   **Handle,\r
+  OUT CONST CHAR8  **Token,\r
+  OUT CONST CHAR8  **Module,\r
+  OUT UINT64       *StartTimeStamp,\r
+  OUT UINT64       *EndTimeStamp,\r
+  OUT UINT32       *Identifier\r
   )\r
 {\r
   return 0;\r
@@ -360,12 +359,12 @@ EndPerformanceMeasurement (
 UINTN\r
 EFIAPI\r
 GetPerformanceMeasurement (\r
-  IN  UINTN       LogEntryKey,\r
-  OUT CONST VOID  **Handle,\r
-  OUT CONST CHAR8 **Token,\r
-  OUT CONST CHAR8 **Module,\r
-  OUT UINT64      *StartTimeStamp,\r
-  OUT UINT64      *EndTimeStamp\r
+  IN  UINTN        LogEntryKey,\r
+  OUT CONST VOID   **Handle,\r
+  OUT CONST CHAR8  **Token,\r
+  OUT CONST CHAR8  **Module,\r
+  OUT UINT64       *StartTimeStamp,\r
+  OUT UINT64       *EndTimeStamp\r
   )\r
 {\r
   return 0;\r
@@ -430,7 +429,7 @@ LogPerformanceMeasurement (
     ASSERT (FALSE);\r
   }\r
 \r
-  return (RETURN_STATUS) Status;\r
+  return (RETURN_STATUS)Status;\r
 }\r
 \r
 /**\r
@@ -448,14 +447,15 @@ LogPerformanceMeasurement (
 BOOLEAN\r
 EFIAPI\r
 LogPerformanceMeasurementEnabled (\r
-  IN  CONST UINTN        Type\r
+  IN  CONST UINTN  Type\r
   )\r
 {\r
   //\r
   // When Performance measurement is enabled and the type is not filtered, the performance can be logged.\r
   //\r
-  if (PerformanceMeasurementEnabled () && (PcdGet8(PcdPerformanceLibraryPropertyMask) & Type) == 0) {\r
+  if (PerformanceMeasurementEnabled () && ((PcdGet8 (PcdPerformanceLibraryPropertyMask) & Type) == 0)) {\r
     return TRUE;\r
   }\r
+\r
   return FALSE;\r
 }\r