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

@@ -42,20 +42,24 @@
EFI_STATUS
EFIAPI
VirtioPciDeviceRead (
IN VIRTIO_DEVICE_PROTOCOL *This,
IN UINTN FieldOffset,
IN UINTN FieldSize,
IN UINTN BufferSize,
OUT VOID *Buffer
IN VIRTIO_DEVICE_PROTOCOL *This,
IN UINTN FieldOffset,
IN UINTN FieldSize,
IN UINTN BufferSize,
OUT VOID *Buffer
)
{
VIRTIO_PCI_DEVICE *Dev;
VIRTIO_PCI_DEVICE *Dev;
Dev = VIRTIO_PCI_DEVICE_FROM_VIRTIO_DEVICE (This);
return VirtioPciIoRead (Dev,
Dev->DeviceSpecificConfigurationOffset + FieldOffset,
FieldSize, BufferSize, Buffer);
return VirtioPciIoRead (
Dev,
Dev->DeviceSpecificConfigurationOffset + FieldOffset,
FieldSize,
BufferSize,
Buffer
);
}
/**
@@ -78,30 +82,34 @@ VirtioPciDeviceRead (
EFI_STATUS
EFIAPI
VirtioPciDeviceWrite (
IN VIRTIO_DEVICE_PROTOCOL *This,
IN UINTN FieldOffset,
IN UINTN FieldSize,
IN UINT64 Value
IN VIRTIO_DEVICE_PROTOCOL *This,
IN UINTN FieldOffset,
IN UINTN FieldSize,
IN UINT64 Value
)
{
VIRTIO_PCI_DEVICE *Dev;
VIRTIO_PCI_DEVICE *Dev;
Dev = VIRTIO_PCI_DEVICE_FROM_VIRTIO_DEVICE (This);
return VirtioPciIoWrite (Dev,
Dev->DeviceSpecificConfigurationOffset + FieldOffset, FieldSize, Value);
return VirtioPciIoWrite (
Dev,
Dev->DeviceSpecificConfigurationOffset + FieldOffset,
FieldSize,
Value
);
}
EFI_STATUS
EFIAPI
VirtioPciGetDeviceFeatures (
IN VIRTIO_DEVICE_PROTOCOL *This,
OUT UINT64 *DeviceFeatures
IN VIRTIO_DEVICE_PROTOCOL *This,
OUT UINT64 *DeviceFeatures
)
{
VIRTIO_PCI_DEVICE *Dev;
EFI_STATUS Status;
UINT32 Features32;
VIRTIO_PCI_DEVICE *Dev;
EFI_STATUS Status;
UINT32 Features32;
if (DeviceFeatures == NULL) {
return EFI_INVALID_PARAMETER;
@@ -109,11 +117,17 @@ VirtioPciGetDeviceFeatures (
Dev = VIRTIO_PCI_DEVICE_FROM_VIRTIO_DEVICE (This);
Status = VirtioPciIoRead (Dev, VIRTIO_PCI_OFFSET_DEVICE_FEATURES,
sizeof (UINT32), sizeof (UINT32), &Features32);
Status = VirtioPciIoRead (
Dev,
VIRTIO_PCI_OFFSET_DEVICE_FEATURES,
sizeof (UINT32),
sizeof (UINT32),
&Features32
);
if (!EFI_ERROR (Status)) {
*DeviceFeatures = Features32;
}
return Status;
}
@@ -124,7 +138,7 @@ VirtioPciGetQueueSize (
OUT UINT16 *QueueNumMax
)
{
VIRTIO_PCI_DEVICE *Dev;
VIRTIO_PCI_DEVICE *Dev;
if (QueueNumMax == NULL) {
return EFI_INVALID_PARAMETER;
@@ -132,8 +146,13 @@ VirtioPciGetQueueSize (
Dev = VIRTIO_PCI_DEVICE_FROM_VIRTIO_DEVICE (This);
return VirtioPciIoRead (Dev, VIRTIO_PCI_OFFSET_QUEUE_SIZE, sizeof (UINT16),
sizeof (UINT16), QueueNumMax);
return VirtioPciIoRead (
Dev,
VIRTIO_PCI_OFFSET_QUEUE_SIZE,
sizeof (UINT16),
sizeof (UINT16),
QueueNumMax
);
}
EFI_STATUS
@@ -143,7 +162,7 @@ VirtioPciGetDeviceStatus (
OUT UINT8 *DeviceStatus
)
{
VIRTIO_PCI_DEVICE *Dev;
VIRTIO_PCI_DEVICE *Dev;
if (DeviceStatus == NULL) {
return EFI_INVALID_PARAMETER;
@@ -151,26 +170,36 @@ VirtioPciGetDeviceStatus (
Dev = VIRTIO_PCI_DEVICE_FROM_VIRTIO_DEVICE (This);
return VirtioPciIoRead (Dev, VIRTIO_PCI_OFFSET_QUEUE_DEVICE_STATUS,
sizeof (UINT8), sizeof (UINT8), DeviceStatus);
return VirtioPciIoRead (
Dev,
VIRTIO_PCI_OFFSET_QUEUE_DEVICE_STATUS,
sizeof (UINT8),
sizeof (UINT8),
DeviceStatus
);
}
EFI_STATUS
EFIAPI
VirtioPciSetGuestFeatures (
IN VIRTIO_DEVICE_PROTOCOL *This,
IN UINT64 Features
IN UINT64 Features
)
{
VIRTIO_PCI_DEVICE *Dev;
VIRTIO_PCI_DEVICE *Dev;
Dev = VIRTIO_PCI_DEVICE_FROM_VIRTIO_DEVICE (This);
if (Features > MAX_UINT32) {
return EFI_UNSUPPORTED;
}
return VirtioPciIoWrite (Dev, VIRTIO_PCI_OFFSET_GUEST_FEATURES,
sizeof (UINT32), Features);
return VirtioPciIoWrite (
Dev,
VIRTIO_PCI_OFFSET_GUEST_FEATURES,
sizeof (UINT32),
Features
);
}
EFI_STATUS
@@ -181,35 +210,43 @@ VirtioPciSetQueueAddress (
IN UINT64 RingBaseShift
)
{
VIRTIO_PCI_DEVICE *Dev;
VIRTIO_PCI_DEVICE *Dev;
ASSERT (RingBaseShift == 0);
Dev = VIRTIO_PCI_DEVICE_FROM_VIRTIO_DEVICE (This);
return VirtioPciIoWrite (Dev, VIRTIO_PCI_OFFSET_QUEUE_ADDRESS, sizeof (UINT32),
(UINT32)((UINTN)Ring->Base >> EFI_PAGE_SHIFT));
return VirtioPciIoWrite (
Dev,
VIRTIO_PCI_OFFSET_QUEUE_ADDRESS,
sizeof (UINT32),
(UINT32)((UINTN)Ring->Base >> EFI_PAGE_SHIFT)
);
}
EFI_STATUS
EFIAPI
VirtioPciSetQueueSel (
IN VIRTIO_DEVICE_PROTOCOL *This,
IN UINT16 Sel
IN VIRTIO_DEVICE_PROTOCOL *This,
IN UINT16 Sel
)
{
VIRTIO_PCI_DEVICE *Dev;
VIRTIO_PCI_DEVICE *Dev;
Dev = VIRTIO_PCI_DEVICE_FROM_VIRTIO_DEVICE (This);
return VirtioPciIoWrite (Dev, VIRTIO_PCI_OFFSET_QUEUE_SELECT, sizeof (UINT16),
Sel);
return VirtioPciIoWrite (
Dev,
VIRTIO_PCI_OFFSET_QUEUE_SELECT,
sizeof (UINT16),
Sel
);
}
EFI_STATUS
EFIAPI
VirtioPciSetQueueAlignment (
IN VIRTIO_DEVICE_PROTOCOL *This,
IN VIRTIO_DEVICE_PROTOCOL *This,
IN UINT32 Alignment
)
{
@@ -219,7 +256,7 @@ VirtioPciSetQueueAlignment (
EFI_STATUS
EFIAPI
VirtioPciSetPageSize (
IN VIRTIO_DEVICE_PROTOCOL *This,
IN VIRTIO_DEVICE_PROTOCOL *This,
IN UINT32 PageSize
)
{
@@ -229,23 +266,27 @@ VirtioPciSetPageSize (
EFI_STATUS
EFIAPI
VirtioPciSetQueueNotify (
IN VIRTIO_DEVICE_PROTOCOL *This,
IN UINT16 Index
IN VIRTIO_DEVICE_PROTOCOL *This,
IN UINT16 Index
)
{
VIRTIO_PCI_DEVICE *Dev;
VIRTIO_PCI_DEVICE *Dev;
Dev = VIRTIO_PCI_DEVICE_FROM_VIRTIO_DEVICE (This);
return VirtioPciIoWrite (Dev, VIRTIO_PCI_OFFSET_QUEUE_NOTIFY, sizeof (UINT16),
Index);
return VirtioPciIoWrite (
Dev,
VIRTIO_PCI_OFFSET_QUEUE_NOTIFY,
sizeof (UINT16),
Index
);
}
EFI_STATUS
EFIAPI
VirtioPciSetQueueSize (
IN VIRTIO_DEVICE_PROTOCOL *This,
IN UINT16 Size
IN VIRTIO_DEVICE_PROTOCOL *This,
IN UINT16 Size
)
{
//
@@ -258,16 +299,20 @@ VirtioPciSetQueueSize (
EFI_STATUS
EFIAPI
VirtioPciSetDeviceStatus (
IN VIRTIO_DEVICE_PROTOCOL *This,
IN UINT8 DeviceStatus
IN VIRTIO_DEVICE_PROTOCOL *This,
IN UINT8 DeviceStatus
)
{
VIRTIO_PCI_DEVICE *Dev;
VIRTIO_PCI_DEVICE *Dev;
Dev = VIRTIO_PCI_DEVICE_FROM_VIRTIO_DEVICE (This);
return VirtioPciIoWrite (Dev, VIRTIO_PCI_OFFSET_QUEUE_DEVICE_STATUS,
sizeof (UINT8), DeviceStatus);
return VirtioPciIoWrite (
Dev,
VIRTIO_PCI_OFFSET_QUEUE_DEVICE_STATUS,
sizeof (UINT8),
DeviceStatus
);
}
EFI_STATUS
@@ -278,7 +323,7 @@ VirtioPciAllocateSharedPages (
OUT VOID **HostAddress
)
{
VOID *Buffer;
VOID *Buffer;
Buffer = AllocatePages (NumPages);
if (Buffer == NULL) {
@@ -311,8 +356,8 @@ VirtioPciMapSharedBuffer (
OUT VOID **Mapping
)
{
*DeviceAddress = (EFI_PHYSICAL_ADDRESS) (UINTN) HostAddress;
*Mapping = NULL;
*DeviceAddress = (EFI_PHYSICAL_ADDRESS)(UINTN)HostAddress;
*Mapping = NULL;
return EFI_SUCCESS;
}
@@ -320,8 +365,8 @@ VirtioPciMapSharedBuffer (
EFI_STATUS
EFIAPI
VirtioPciUnmapSharedBuffer (
IN VIRTIO_DEVICE_PROTOCOL *This,
IN VOID *Mapping
IN VIRTIO_DEVICE_PROTOCOL *This,
IN VOID *Mapping
)
{
return EFI_SUCCESS;