EmbeddedPkg: Apply uncrustify changes

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

Apply uncrustify changes to .c/.h files in the EmbeddedPkg 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:53:56 -08:00
committed by mergify[bot]
parent 731c67e1d7
commit e7108d0e96
106 changed files with 9242 additions and 7648 deletions

View File

@@ -12,11 +12,10 @@
#include <Library/DmaLib.h>
#include <Library/MemoryAllocationLib.h>
STATIC
PHYSICAL_ADDRESS
HostToDeviceAddress (
IN VOID *Address
IN VOID *Address
)
{
return (PHYSICAL_ADDRESS)(UINTN)Address + PcdGet64 (PcdDmaDeviceOffset);
@@ -45,25 +44,26 @@ HostToDeviceAddress (
EFI_STATUS
EFIAPI
DmaMap (
IN DMA_MAP_OPERATION Operation,
IN VOID *HostAddress,
IN OUT UINTN *NumberOfBytes,
OUT PHYSICAL_ADDRESS *DeviceAddress,
OUT VOID **Mapping
IN DMA_MAP_OPERATION Operation,
IN VOID *HostAddress,
IN OUT UINTN *NumberOfBytes,
OUT PHYSICAL_ADDRESS *DeviceAddress,
OUT VOID **Mapping
)
{
if (HostAddress == NULL ||
NumberOfBytes == NULL ||
DeviceAddress == NULL ||
Mapping == NULL ) {
if ((HostAddress == NULL) ||
(NumberOfBytes == NULL) ||
(DeviceAddress == NULL) ||
(Mapping == NULL))
{
return EFI_INVALID_PARAMETER;
}
*DeviceAddress = HostToDeviceAddress (HostAddress);
*Mapping = NULL;
*Mapping = NULL;
return EFI_SUCCESS;
}
/**
Completes the DmaMapBusMasterRead(), DmaMapBusMasterWrite(), or DmaMapBusMasterCommonBuffer()
operation and releases any corresponding resources.
@@ -77,7 +77,7 @@ DmaMap (
EFI_STATUS
EFIAPI
DmaUnmap (
IN VOID *Mapping
IN VOID *Mapping
)
{
return EFI_SUCCESS;
@@ -103,15 +103,14 @@ DmaUnmap (
EFI_STATUS
EFIAPI
DmaAllocateBuffer (
IN EFI_MEMORY_TYPE MemoryType,
IN UINTN Pages,
OUT VOID **HostAddress
IN EFI_MEMORY_TYPE MemoryType,
IN UINTN Pages,
OUT VOID **HostAddress
)
{
return DmaAllocateAlignedBuffer (MemoryType, Pages, 0, HostAddress);
}
/**
Allocates pages that are suitable for an DmaMap() of type
MapOperationBusMasterCommonBuffer mapping, at the requested alignment.
@@ -134,18 +133,19 @@ DmaAllocateBuffer (
EFI_STATUS
EFIAPI
DmaAllocateAlignedBuffer (
IN EFI_MEMORY_TYPE MemoryType,
IN UINTN Pages,
IN UINTN Alignment,
OUT VOID **HostAddress
IN EFI_MEMORY_TYPE MemoryType,
IN UINTN Pages,
IN UINTN Alignment,
OUT VOID **HostAddress
)
{
if (Alignment == 0) {
Alignment = EFI_PAGE_SIZE;
}
if (HostAddress == NULL ||
(Alignment & (Alignment - 1)) != 0) {
if ((HostAddress == NULL) ||
((Alignment & (Alignment - 1)) != 0))
{
return EFI_INVALID_PARAMETER;
}
@@ -163,10 +163,10 @@ DmaAllocateAlignedBuffer (
if (*HostAddress == NULL) {
return EFI_OUT_OF_RESOURCES;
}
return EFI_SUCCESS;
}
/**
Frees memory that was allocated with DmaAllocateBuffer().
@@ -181,15 +181,14 @@ DmaAllocateAlignedBuffer (
EFI_STATUS
EFIAPI
DmaFreeBuffer (
IN UINTN Pages,
IN VOID *HostAddress
IN UINTN Pages,
IN VOID *HostAddress
)
{
if (HostAddress == NULL) {
return EFI_INVALID_PARAMETER;
return EFI_INVALID_PARAMETER;
}
FreePages (HostAddress, Pages);
return EFI_SUCCESS;
}