OvmfPkg: Apply uncrustify changes

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737

Apply uncrustify changes to .c/.h files in the OvmfPkg package

Cc: Andrew Fish <afish@apple.com>
Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: Andrew Fish <afish@apple.com>
This commit is contained in:
Michael Kubacki
2021-12-05 14:54:09 -08:00
committed by mergify[bot]
parent d1050b9dff
commit ac0a286f4d
445 changed files with 30894 additions and 26369 deletions

View File

@@ -15,7 +15,7 @@
//
// The constant value that is read from the debug I/O port
//
#define BOCHS_DEBUG_PORT_MAGIC 0xE9
#define BOCHS_DEBUG_PORT_MAGIC 0xE9
/**
Return the result of detecting the debug I/O port device.

View File

@@ -27,7 +27,7 @@
// VA_LIST can not initialize to NULL for all compiler, so we use this to
// indicate a null VA_LIST
//
VA_LIST mVaListNull;
VA_LIST mVaListNull;
/**
Prints a debug message to the debug output device if the specified error level is enabled.
@@ -52,14 +52,13 @@ DebugPrint (
...
)
{
VA_LIST Marker;
VA_LIST Marker;
VA_START (Marker, Format);
DebugVPrint (ErrorLevel, Format, Marker);
VA_END (Marker);
}
/**
Prints a debug message to the debug output device if the specified
error level is enabled base on Null-terminated format string and a
@@ -79,14 +78,14 @@ DebugPrint (
**/
VOID
DebugPrintMarker (
IN UINTN ErrorLevel,
IN CONST CHAR8 *Format,
IN VA_LIST VaListMarker,
IN BASE_LIST BaseListMarker
IN UINTN ErrorLevel,
IN CONST CHAR8 *Format,
IN VA_LIST VaListMarker,
IN BASE_LIST BaseListMarker
)
{
CHAR8 Buffer[MAX_DEBUG_MESSAGE_LENGTH];
UINTN Length;
CHAR8 Buffer[MAX_DEBUG_MESSAGE_LENGTH];
UINTN Length;
//
// If Format is NULL, then ASSERT().
@@ -96,8 +95,9 @@ DebugPrintMarker (
//
// Check if the global mask disables this message or the device is inactive
//
if ((ErrorLevel & GetDebugPrintErrorLevel ()) == 0 ||
!PlatformDebugLibIoPortFound ()) {
if (((ErrorLevel & GetDebugPrintErrorLevel ()) == 0) ||
!PlatformDebugLibIoPortFound ())
{
return;
}
@@ -116,7 +116,6 @@ DebugPrintMarker (
IoWriteFifo8 (PcdGet16 (PcdDebugIoPort), Length, Buffer);
}
/**
Prints a debug message to the debug output device if the specified
error level is enabled.
@@ -135,15 +134,14 @@ DebugPrintMarker (
VOID
EFIAPI
DebugVPrint (
IN UINTN ErrorLevel,
IN CONST CHAR8 *Format,
IN VA_LIST VaListMarker
IN UINTN ErrorLevel,
IN CONST CHAR8 *Format,
IN VA_LIST VaListMarker
)
{
DebugPrintMarker (ErrorLevel, Format, VaListMarker, NULL);
}
/**
Prints a debug message to the debug output device if the specified
error level is enabled.
@@ -164,15 +162,14 @@ DebugVPrint (
VOID
EFIAPI
DebugBPrint (
IN UINTN ErrorLevel,
IN CONST CHAR8 *Format,
IN BASE_LIST BaseListMarker
IN UINTN ErrorLevel,
IN CONST CHAR8 *Format,
IN BASE_LIST BaseListMarker
)
{
DebugPrintMarker (ErrorLevel, Format, mVaListNull, BaseListMarker);
}
/**
Prints an assert message containing a filename, line number, and description.
This may be followed by a breakpoint or a dead loop.
@@ -208,8 +205,14 @@ DebugAssert (
//
// Generate the ASSERT() message in Ascii format
//
Length = AsciiSPrint (Buffer, sizeof Buffer, "ASSERT %a(%Lu): %a\n",
FileName, (UINT64)LineNumber, Description);
Length = AsciiSPrint (
Buffer,
sizeof Buffer,
"ASSERT %a(%Lu): %a\n",
FileName,
(UINT64)LineNumber,
Description
);
//
// Send the print string to the debug I/O port, if present
@@ -221,14 +224,13 @@ DebugAssert (
//
// Generate a Breakpoint, DeadLoop, or NOP based on PCD settings
//
if ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_ASSERT_BREAKPOINT_ENABLED) != 0) {
if ((PcdGet8 (PcdDebugPropertyMask) & DEBUG_PROPERTY_ASSERT_BREAKPOINT_ENABLED) != 0) {
CpuBreakpoint ();
} else if ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_ASSERT_DEADLOOP_ENABLED) != 0) {
} else if ((PcdGet8 (PcdDebugPropertyMask) & DEBUG_PROPERTY_ASSERT_DEADLOOP_ENABLED) != 0) {
CpuDeadLoop ();
}
}
/**
Fills a target buffer with PcdDebugClearMemoryValue, and returns the target buffer.
@@ -259,10 +261,9 @@ DebugClearMemory (
//
// SetMem() checks for the the ASSERT() condition on Length and returns Buffer
//
return SetMem (Buffer, Length, PcdGet8(PcdDebugClearMemoryValue));
return SetMem (Buffer, Length, PcdGet8 (PcdDebugClearMemoryValue));
}
/**
Returns TRUE if ASSERT() macros are enabled.
@@ -279,10 +280,9 @@ DebugAssertEnabled (
VOID
)
{
return (BOOLEAN) ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED) != 0);
return (BOOLEAN)((PcdGet8 (PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED) != 0);
}
/**
Returns TRUE if DEBUG() macros are enabled.
@@ -299,10 +299,9 @@ DebugPrintEnabled (
VOID
)
{
return (BOOLEAN) ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_PRINT_ENABLED) != 0);
return (BOOLEAN)((PcdGet8 (PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_PRINT_ENABLED) != 0);
}
/**
Returns TRUE if DEBUG_CODE() macros are enabled.
@@ -319,10 +318,9 @@ DebugCodeEnabled (
VOID
)
{
return (BOOLEAN) ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_CODE_ENABLED) != 0);
return (BOOLEAN)((PcdGet8 (PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_CODE_ENABLED) != 0);
}
/**
Returns TRUE if DEBUG_CLEAR_MEMORY() macro is enabled.
@@ -339,7 +337,7 @@ DebugClearMemoryEnabled (
VOID
)
{
return (BOOLEAN) ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED) != 0);
return (BOOLEAN)((PcdGet8 (PcdDebugPropertyMask) & DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED) != 0);
}
/**
@@ -354,8 +352,8 @@ DebugClearMemoryEnabled (
BOOLEAN
EFIAPI
DebugPrintLevelEnabled (
IN CONST UINTN ErrorLevel
IN CONST UINTN ErrorLevel
)
{
return (BOOLEAN) ((ErrorLevel & PcdGet32(PcdFixedDebugPrintErrorLevel)) != 0);
return (BOOLEAN)((ErrorLevel & PcdGet32 (PcdFixedDebugPrintErrorLevel)) != 0);
}

View File

@@ -13,12 +13,12 @@
//
// Set to TRUE if the debug I/O port has been checked
//
STATIC BOOLEAN mDebugIoPortChecked = FALSE;
STATIC BOOLEAN mDebugIoPortChecked = FALSE;
//
// Set to TRUE if the debug I/O port is enabled
//
STATIC BOOLEAN mDebugIoPortFound = FALSE;
STATIC BOOLEAN mDebugIoPortFound = FALSE;
/**
This constructor function must not do anything.
@@ -58,8 +58,9 @@ PlatformDebugLibIoPortFound (
)
{
if (!mDebugIoPortChecked) {
mDebugIoPortFound = PlatformDebugLibIoPortDetect ();
mDebugIoPortFound = PlatformDebugLibIoPortDetect ();
mDebugIoPortChecked = TRUE;
}
return mDebugIoPortFound;
}