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

@@ -36,8 +36,8 @@
// in general, it is actually fine for the Xen domU (guest) environment that
// this module is intended for, as UEFI always executes from DRAM in that case.
//
STATIC evtchn_send_t mXenConsoleEventChain;
STATIC struct xencons_interface *mXenConsoleInterface;
STATIC evtchn_send_t mXenConsoleEventChain;
STATIC struct xencons_interface *mXenConsoleInterface;
/**
Initialize the serial device hardware.
@@ -56,19 +56,20 @@ SerialPortInitialize (
VOID
)
{
if (! XenHypercallIsAvailable ()) {
if (!XenHypercallIsAvailable ()) {
return RETURN_DEVICE_ERROR;
}
if (!mXenConsoleInterface) {
mXenConsoleEventChain.port = (UINT32)XenHypercallHvmGetParam (HVM_PARAM_CONSOLE_EVTCHN);
mXenConsoleInterface = (struct xencons_interface *)(UINTN)
(XenHypercallHvmGetParam (HVM_PARAM_CONSOLE_PFN) << EFI_PAGE_SHIFT);
mXenConsoleInterface = (struct xencons_interface *)(UINTN)
(XenHypercallHvmGetParam (HVM_PARAM_CONSOLE_PFN) << EFI_PAGE_SHIFT);
//
// No point in ASSERT'ing here as we won't be seeing the output
//
}
return RETURN_SUCCESS;
}
@@ -92,8 +93,8 @@ SerialPortInitialize (
UINTN
EFIAPI
SerialPortWrite (
IN UINT8 *Buffer,
IN UINTN NumberOfBytes
IN UINT8 *Buffer,
IN UINTN NumberOfBytes
)
{
XENCONS_RING_IDX Consumer, Producer;
@@ -116,15 +117,15 @@ SerialPortWrite (
MemoryFence ();
while (Sent < NumberOfBytes && ((Producer - Consumer) < sizeof (mXenConsoleInterface->out)))
mXenConsoleInterface->out[MASK_XENCONS_IDX(Producer++, mXenConsoleInterface->out)] = Buffer[Sent++];
while (Sent < NumberOfBytes && ((Producer - Consumer) < sizeof (mXenConsoleInterface->out))) {
mXenConsoleInterface->out[MASK_XENCONS_IDX (Producer++, mXenConsoleInterface->out)] = Buffer[Sent++];
}
MemoryFence ();
mXenConsoleInterface->out_prod = Producer;
XenHypercallEventChannelOp (EVTCHNOP_send, &mXenConsoleEventChain);
} while (Sent < NumberOfBytes);
return Sent;
@@ -148,9 +149,9 @@ SerialPortWrite (
UINTN
EFIAPI
SerialPortRead (
OUT UINT8 *Buffer,
IN UINTN NumberOfBytes
)
OUT UINT8 *Buffer,
IN UINTN NumberOfBytes
)
{
XENCONS_RING_IDX Consumer, Producer;
UINTN Received;
@@ -171,8 +172,9 @@ SerialPortRead (
MemoryFence ();
Received = 0;
while (Received < NumberOfBytes && Consumer < Producer)
Buffer[Received++] = mXenConsoleInterface->in[MASK_XENCONS_IDX(Consumer++, mXenConsoleInterface->in)];
while (Received < NumberOfBytes && Consumer < Producer) {
Buffer[Received++] = mXenConsoleInterface->in[MASK_XENCONS_IDX (Consumer++, mXenConsoleInterface->in)];
}
MemoryFence ();
@@ -197,7 +199,7 @@ SerialPortPoll (
)
{
return mXenConsoleInterface &&
mXenConsoleInterface->in_cons != mXenConsoleInterface->in_prod;
mXenConsoleInterface->in_cons != mXenConsoleInterface->in_prod;
}
/**
@@ -213,7 +215,7 @@ SerialPortPoll (
RETURN_STATUS
EFIAPI
SerialPortSetControl (
IN UINT32 Control
IN UINT32 Control
)
{
return RETURN_UNSUPPORTED;
@@ -232,7 +234,7 @@ SerialPortSetControl (
RETURN_STATUS
EFIAPI
SerialPortGetControl (
OUT UINT32 *Control
OUT UINT32 *Control
)
{
if (!mXenConsoleInterface) {
@@ -243,6 +245,7 @@ SerialPortGetControl (
if (!SerialPortPoll ()) {
*Control = EFI_SERIAL_INPUT_BUFFER_EMPTY;
}
return RETURN_SUCCESS;
}
@@ -282,14 +285,13 @@ SerialPortGetControl (
RETURN_STATUS
EFIAPI
SerialPortSetAttributes (
IN OUT UINT64 *BaudRate,
IN OUT UINT32 *ReceiveFifoDepth,
IN OUT UINT32 *Timeout,
IN OUT EFI_PARITY_TYPE *Parity,
IN OUT UINT8 *DataBits,
IN OUT EFI_STOP_BITS_TYPE *StopBits
IN OUT UINT64 *BaudRate,
IN OUT UINT32 *ReceiveFifoDepth,
IN OUT UINT32 *Timeout,
IN OUT EFI_PARITY_TYPE *Parity,
IN OUT UINT8 *DataBits,
IN OUT EFI_STOP_BITS_TYPE *StopBits
)
{
return RETURN_UNSUPPORTED;
}