MdePkg: Apply uncrustify changes
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737 Apply uncrustify changes to .c/.h files in the MdePkg 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: Liming Gao <gaoliming@byosoft.com.cn>
This commit is contained in:
committed by
mergify[bot]
parent
1436aea4d5
commit
2f88bd3a12
@@ -8,7 +8,6 @@
|
||||
|
||||
**/
|
||||
|
||||
|
||||
#include <PiPei.h>
|
||||
|
||||
#include <Library/IoLib.h>
|
||||
@@ -16,7 +15,6 @@
|
||||
#include <Library/BaseLib.h>
|
||||
#include <Library/PeiServicesTablePointerLib.h>
|
||||
|
||||
|
||||
/**
|
||||
Reads registers in the EFI CPU I/O space.
|
||||
|
||||
@@ -42,9 +40,9 @@ IoReadFifoWorker (
|
||||
IN VOID *Buffer
|
||||
)
|
||||
{
|
||||
CONST EFI_PEI_SERVICES **PeiServices;
|
||||
EFI_PEI_CPU_IO_PPI *CpuIo;
|
||||
EFI_STATUS Status;
|
||||
CONST EFI_PEI_SERVICES **PeiServices;
|
||||
EFI_PEI_CPU_IO_PPI *CpuIo;
|
||||
EFI_STATUS Status;
|
||||
|
||||
PeiServices = GetPeiServicesTablePointer ();
|
||||
CpuIo = (*PeiServices)->CpuIo;
|
||||
@@ -79,9 +77,9 @@ IoWriteFifoWorker (
|
||||
IN VOID *Buffer
|
||||
)
|
||||
{
|
||||
CONST EFI_PEI_SERVICES **PeiServices;
|
||||
EFI_PEI_CPU_IO_PPI *CpuIo;
|
||||
EFI_STATUS Status;
|
||||
CONST EFI_PEI_SERVICES **PeiServices;
|
||||
EFI_PEI_CPU_IO_PPI *CpuIo;
|
||||
EFI_STATUS Status;
|
||||
|
||||
PeiServices = GetPeiServicesTablePointer ();
|
||||
CpuIo = (*PeiServices)->CpuIo;
|
||||
@@ -108,17 +106,17 @@ IoWriteFifoWorker (
|
||||
UINT8
|
||||
EFIAPI
|
||||
IoRead8 (
|
||||
IN UINTN Port
|
||||
IN UINTN Port
|
||||
)
|
||||
{
|
||||
CONST EFI_PEI_SERVICES **PeiServices;
|
||||
EFI_PEI_CPU_IO_PPI *CpuIo;
|
||||
CONST EFI_PEI_SERVICES **PeiServices;
|
||||
EFI_PEI_CPU_IO_PPI *CpuIo;
|
||||
|
||||
PeiServices = GetPeiServicesTablePointer ();
|
||||
CpuIo = (*PeiServices)->CpuIo;
|
||||
ASSERT (CpuIo != NULL);
|
||||
|
||||
return CpuIo->IoRead8 (PeiServices, CpuIo, (UINT64) Port);
|
||||
return CpuIo->IoRead8 (PeiServices, CpuIo, (UINT64)Port);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -139,18 +137,18 @@ IoRead8 (
|
||||
UINT8
|
||||
EFIAPI
|
||||
IoWrite8 (
|
||||
IN UINTN Port,
|
||||
IN UINT8 Value
|
||||
IN UINTN Port,
|
||||
IN UINT8 Value
|
||||
)
|
||||
{
|
||||
CONST EFI_PEI_SERVICES **PeiServices;
|
||||
EFI_PEI_CPU_IO_PPI *CpuIo;
|
||||
CONST EFI_PEI_SERVICES **PeiServices;
|
||||
EFI_PEI_CPU_IO_PPI *CpuIo;
|
||||
|
||||
PeiServices = GetPeiServicesTablePointer ();
|
||||
CpuIo = (*PeiServices)->CpuIo;
|
||||
ASSERT (CpuIo != NULL);
|
||||
|
||||
CpuIo->IoWrite8 (PeiServices, CpuIo, (UINT64) Port, Value);
|
||||
CpuIo->IoWrite8 (PeiServices, CpuIo, (UINT64)Port, Value);
|
||||
return Value;
|
||||
}
|
||||
|
||||
@@ -172,11 +170,11 @@ IoWrite8 (
|
||||
UINT16
|
||||
EFIAPI
|
||||
IoRead16 (
|
||||
IN UINTN Port
|
||||
IN UINTN Port
|
||||
)
|
||||
{
|
||||
CONST EFI_PEI_SERVICES **PeiServices;
|
||||
EFI_PEI_CPU_IO_PPI *CpuIo;
|
||||
CONST EFI_PEI_SERVICES **PeiServices;
|
||||
EFI_PEI_CPU_IO_PPI *CpuIo;
|
||||
|
||||
PeiServices = GetPeiServicesTablePointer ();
|
||||
CpuIo = (*PeiServices)->CpuIo;
|
||||
@@ -185,7 +183,7 @@ IoRead16 (
|
||||
// Make sure Port is aligned on a 16-bit boundary.
|
||||
//
|
||||
ASSERT ((Port & 1) == 0);
|
||||
return CpuIo->IoRead16 (PeiServices, CpuIo, (UINT64) Port);
|
||||
return CpuIo->IoRead16 (PeiServices, CpuIo, (UINT64)Port);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -207,12 +205,12 @@ IoRead16 (
|
||||
UINT16
|
||||
EFIAPI
|
||||
IoWrite16 (
|
||||
IN UINTN Port,
|
||||
IN UINT16 Value
|
||||
IN UINTN Port,
|
||||
IN UINT16 Value
|
||||
)
|
||||
{
|
||||
CONST EFI_PEI_SERVICES **PeiServices;
|
||||
EFI_PEI_CPU_IO_PPI *CpuIo;
|
||||
CONST EFI_PEI_SERVICES **PeiServices;
|
||||
EFI_PEI_CPU_IO_PPI *CpuIo;
|
||||
|
||||
PeiServices = GetPeiServicesTablePointer ();
|
||||
CpuIo = (*PeiServices)->CpuIo;
|
||||
@@ -221,7 +219,7 @@ IoWrite16 (
|
||||
// Make sure Port is aligned on a 16-bit boundary.
|
||||
//
|
||||
ASSERT ((Port & 1) == 0);
|
||||
CpuIo->IoWrite16 (PeiServices, CpuIo, (UINT64) Port, Value);
|
||||
CpuIo->IoWrite16 (PeiServices, CpuIo, (UINT64)Port, Value);
|
||||
return Value;
|
||||
}
|
||||
|
||||
@@ -243,11 +241,11 @@ IoWrite16 (
|
||||
UINT32
|
||||
EFIAPI
|
||||
IoRead32 (
|
||||
IN UINTN Port
|
||||
IN UINTN Port
|
||||
)
|
||||
{
|
||||
CONST EFI_PEI_SERVICES **PeiServices;
|
||||
EFI_PEI_CPU_IO_PPI *CpuIo;
|
||||
CONST EFI_PEI_SERVICES **PeiServices;
|
||||
EFI_PEI_CPU_IO_PPI *CpuIo;
|
||||
|
||||
PeiServices = GetPeiServicesTablePointer ();
|
||||
CpuIo = (*PeiServices)->CpuIo;
|
||||
@@ -256,7 +254,7 @@ IoRead32 (
|
||||
// Make sure Port is aligned on a 32-bit boundary.
|
||||
//
|
||||
ASSERT ((Port & 3) == 0);
|
||||
return CpuIo->IoRead32 (PeiServices, CpuIo, (UINT64) Port);
|
||||
return CpuIo->IoRead32 (PeiServices, CpuIo, (UINT64)Port);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -278,12 +276,12 @@ IoRead32 (
|
||||
UINT32
|
||||
EFIAPI
|
||||
IoWrite32 (
|
||||
IN UINTN Port,
|
||||
IN UINT32 Value
|
||||
IN UINTN Port,
|
||||
IN UINT32 Value
|
||||
)
|
||||
{
|
||||
CONST EFI_PEI_SERVICES **PeiServices;
|
||||
EFI_PEI_CPU_IO_PPI *CpuIo;
|
||||
CONST EFI_PEI_SERVICES **PeiServices;
|
||||
EFI_PEI_CPU_IO_PPI *CpuIo;
|
||||
|
||||
PeiServices = GetPeiServicesTablePointer ();
|
||||
CpuIo = (*PeiServices)->CpuIo;
|
||||
@@ -292,7 +290,7 @@ IoWrite32 (
|
||||
// Make sure Port is aligned on a 32-bit boundary.
|
||||
//
|
||||
ASSERT ((Port & 3) == 0);
|
||||
CpuIo->IoWrite32 (PeiServices, CpuIo, (UINT64) Port, Value);
|
||||
CpuIo->IoWrite32 (PeiServices, CpuIo, (UINT64)Port, Value);
|
||||
return Value;
|
||||
}
|
||||
|
||||
@@ -314,11 +312,11 @@ IoWrite32 (
|
||||
UINT64
|
||||
EFIAPI
|
||||
IoRead64 (
|
||||
IN UINTN Port
|
||||
IN UINTN Port
|
||||
)
|
||||
{
|
||||
CONST EFI_PEI_SERVICES **PeiServices;
|
||||
EFI_PEI_CPU_IO_PPI *CpuIo;
|
||||
CONST EFI_PEI_SERVICES **PeiServices;
|
||||
EFI_PEI_CPU_IO_PPI *CpuIo;
|
||||
|
||||
PeiServices = GetPeiServicesTablePointer ();
|
||||
CpuIo = (*PeiServices)->CpuIo;
|
||||
@@ -327,7 +325,7 @@ IoRead64 (
|
||||
// Make sure Port is aligned on a 64-bit boundary.
|
||||
//
|
||||
ASSERT ((Port & 7) == 0);
|
||||
return CpuIo->IoRead64 (PeiServices, CpuIo, (UINT64) Port);
|
||||
return CpuIo->IoRead64 (PeiServices, CpuIo, (UINT64)Port);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -349,12 +347,12 @@ IoRead64 (
|
||||
UINT64
|
||||
EFIAPI
|
||||
IoWrite64 (
|
||||
IN UINTN Port,
|
||||
IN UINT64 Value
|
||||
IN UINTN Port,
|
||||
IN UINT64 Value
|
||||
)
|
||||
{
|
||||
CONST EFI_PEI_SERVICES **PeiServices;
|
||||
EFI_PEI_CPU_IO_PPI *CpuIo;
|
||||
CONST EFI_PEI_SERVICES **PeiServices;
|
||||
EFI_PEI_CPU_IO_PPI *CpuIo;
|
||||
|
||||
PeiServices = GetPeiServicesTablePointer ();
|
||||
CpuIo = (*PeiServices)->CpuIo;
|
||||
@@ -363,8 +361,8 @@ IoWrite64 (
|
||||
// Make sure Port is aligned on a 64-bit boundary.
|
||||
//
|
||||
ASSERT ((Port & 7) == 0);
|
||||
CpuIo->IoWrite64 (PeiServices, CpuIo, (UINT64) Port, Value);
|
||||
return Value;;
|
||||
CpuIo->IoWrite64 (PeiServices, CpuIo, (UINT64)Port, Value);
|
||||
return Value;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -387,9 +385,9 @@ IoWrite64 (
|
||||
VOID
|
||||
EFIAPI
|
||||
IoReadFifo8 (
|
||||
IN UINTN Port,
|
||||
IN UINTN Count,
|
||||
OUT VOID *Buffer
|
||||
IN UINTN Port,
|
||||
IN UINTN Count,
|
||||
OUT VOID *Buffer
|
||||
)
|
||||
{
|
||||
IoReadFifoWorker (Port, EfiPeiCpuIoWidthFifoUint8, Count, Buffer);
|
||||
@@ -415,9 +413,9 @@ IoReadFifo8 (
|
||||
VOID
|
||||
EFIAPI
|
||||
IoWriteFifo8 (
|
||||
IN UINTN Port,
|
||||
IN UINTN Count,
|
||||
IN VOID *Buffer
|
||||
IN UINTN Port,
|
||||
IN UINTN Count,
|
||||
IN VOID *Buffer
|
||||
)
|
||||
{
|
||||
IoWriteFifoWorker (Port, EfiPeiCpuIoWidthFifoUint8, Count, Buffer);
|
||||
@@ -443,9 +441,9 @@ IoWriteFifo8 (
|
||||
VOID
|
||||
EFIAPI
|
||||
IoReadFifo16 (
|
||||
IN UINTN Port,
|
||||
IN UINTN Count,
|
||||
OUT VOID *Buffer
|
||||
IN UINTN Port,
|
||||
IN UINTN Count,
|
||||
OUT VOID *Buffer
|
||||
)
|
||||
{
|
||||
//
|
||||
@@ -475,9 +473,9 @@ IoReadFifo16 (
|
||||
VOID
|
||||
EFIAPI
|
||||
IoWriteFifo16 (
|
||||
IN UINTN Port,
|
||||
IN UINTN Count,
|
||||
IN VOID *Buffer
|
||||
IN UINTN Port,
|
||||
IN UINTN Count,
|
||||
IN VOID *Buffer
|
||||
)
|
||||
{
|
||||
//
|
||||
@@ -507,9 +505,9 @@ IoWriteFifo16 (
|
||||
VOID
|
||||
EFIAPI
|
||||
IoReadFifo32 (
|
||||
IN UINTN Port,
|
||||
IN UINTN Count,
|
||||
OUT VOID *Buffer
|
||||
IN UINTN Port,
|
||||
IN UINTN Count,
|
||||
OUT VOID *Buffer
|
||||
)
|
||||
{
|
||||
//
|
||||
@@ -539,9 +537,9 @@ IoReadFifo32 (
|
||||
VOID
|
||||
EFIAPI
|
||||
IoWriteFifo32 (
|
||||
IN UINTN Port,
|
||||
IN UINTN Count,
|
||||
IN VOID *Buffer
|
||||
IN UINTN Port,
|
||||
IN UINTN Count,
|
||||
IN VOID *Buffer
|
||||
)
|
||||
{
|
||||
//
|
||||
@@ -568,17 +566,17 @@ IoWriteFifo32 (
|
||||
UINT8
|
||||
EFIAPI
|
||||
MmioRead8 (
|
||||
IN UINTN Address
|
||||
IN UINTN Address
|
||||
)
|
||||
{
|
||||
CONST EFI_PEI_SERVICES **PeiServices;
|
||||
EFI_PEI_CPU_IO_PPI *CpuIo;
|
||||
CONST EFI_PEI_SERVICES **PeiServices;
|
||||
EFI_PEI_CPU_IO_PPI *CpuIo;
|
||||
|
||||
PeiServices = GetPeiServicesTablePointer ();
|
||||
CpuIo = (*PeiServices)->CpuIo;
|
||||
ASSERT (CpuIo != NULL);
|
||||
|
||||
return CpuIo->MemRead8 (PeiServices, CpuIo, (UINT64) Address);
|
||||
return CpuIo->MemRead8 (PeiServices, CpuIo, (UINT64)Address);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -599,18 +597,18 @@ MmioRead8 (
|
||||
UINT8
|
||||
EFIAPI
|
||||
MmioWrite8 (
|
||||
IN UINTN Address,
|
||||
IN UINT8 Value
|
||||
IN UINTN Address,
|
||||
IN UINT8 Value
|
||||
)
|
||||
{
|
||||
CONST EFI_PEI_SERVICES **PeiServices;
|
||||
EFI_PEI_CPU_IO_PPI *CpuIo;
|
||||
CONST EFI_PEI_SERVICES **PeiServices;
|
||||
EFI_PEI_CPU_IO_PPI *CpuIo;
|
||||
|
||||
PeiServices = GetPeiServicesTablePointer ();
|
||||
CpuIo = (*PeiServices)->CpuIo;
|
||||
ASSERT (CpuIo != NULL);
|
||||
|
||||
CpuIo->MemWrite8 (PeiServices, CpuIo, (UINT64) Address, Value);
|
||||
CpuIo->MemWrite8 (PeiServices, CpuIo, (UINT64)Address, Value);
|
||||
return Value;
|
||||
}
|
||||
|
||||
@@ -632,11 +630,11 @@ MmioWrite8 (
|
||||
UINT16
|
||||
EFIAPI
|
||||
MmioRead16 (
|
||||
IN UINTN Address
|
||||
IN UINTN Address
|
||||
)
|
||||
{
|
||||
CONST EFI_PEI_SERVICES **PeiServices;
|
||||
EFI_PEI_CPU_IO_PPI *CpuIo;
|
||||
CONST EFI_PEI_SERVICES **PeiServices;
|
||||
EFI_PEI_CPU_IO_PPI *CpuIo;
|
||||
|
||||
PeiServices = GetPeiServicesTablePointer ();
|
||||
CpuIo = (*PeiServices)->CpuIo;
|
||||
@@ -645,8 +643,7 @@ MmioRead16 (
|
||||
// Make sure Address is aligned on a 16-bit boundary.
|
||||
//
|
||||
ASSERT ((Address & 1) == 0);
|
||||
return CpuIo->MemRead16 (PeiServices, CpuIo, (UINT64) Address);
|
||||
|
||||
return CpuIo->MemRead16 (PeiServices, CpuIo, (UINT64)Address);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -668,12 +665,12 @@ MmioRead16 (
|
||||
UINT16
|
||||
EFIAPI
|
||||
MmioWrite16 (
|
||||
IN UINTN Address,
|
||||
IN UINT16 Value
|
||||
IN UINTN Address,
|
||||
IN UINT16 Value
|
||||
)
|
||||
{
|
||||
CONST EFI_PEI_SERVICES **PeiServices;
|
||||
EFI_PEI_CPU_IO_PPI *CpuIo;
|
||||
CONST EFI_PEI_SERVICES **PeiServices;
|
||||
EFI_PEI_CPU_IO_PPI *CpuIo;
|
||||
|
||||
PeiServices = GetPeiServicesTablePointer ();
|
||||
CpuIo = (*PeiServices)->CpuIo;
|
||||
@@ -682,7 +679,7 @@ MmioWrite16 (
|
||||
// Make sure Address is aligned on a 16-bit boundary.
|
||||
//
|
||||
ASSERT ((Address & 1) == 0);
|
||||
CpuIo->MemWrite16 (PeiServices, CpuIo, (UINT64) Address, Value);
|
||||
CpuIo->MemWrite16 (PeiServices, CpuIo, (UINT64)Address, Value);
|
||||
return Value;
|
||||
}
|
||||
|
||||
@@ -704,11 +701,11 @@ MmioWrite16 (
|
||||
UINT32
|
||||
EFIAPI
|
||||
MmioRead32 (
|
||||
IN UINTN Address
|
||||
IN UINTN Address
|
||||
)
|
||||
{
|
||||
CONST EFI_PEI_SERVICES **PeiServices;
|
||||
EFI_PEI_CPU_IO_PPI *CpuIo;
|
||||
CONST EFI_PEI_SERVICES **PeiServices;
|
||||
EFI_PEI_CPU_IO_PPI *CpuIo;
|
||||
|
||||
PeiServices = GetPeiServicesTablePointer ();
|
||||
CpuIo = (*PeiServices)->CpuIo;
|
||||
@@ -717,8 +714,7 @@ MmioRead32 (
|
||||
// Make sure Address is aligned on a 32-bit boundary.
|
||||
//
|
||||
ASSERT ((Address & 3) == 0);
|
||||
return CpuIo->MemRead32 (PeiServices, CpuIo, (UINT64) Address);
|
||||
|
||||
return CpuIo->MemRead32 (PeiServices, CpuIo, (UINT64)Address);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -740,12 +736,12 @@ MmioRead32 (
|
||||
UINT32
|
||||
EFIAPI
|
||||
MmioWrite32 (
|
||||
IN UINTN Address,
|
||||
IN UINT32 Value
|
||||
IN UINTN Address,
|
||||
IN UINT32 Value
|
||||
)
|
||||
{
|
||||
CONST EFI_PEI_SERVICES **PeiServices;
|
||||
EFI_PEI_CPU_IO_PPI *CpuIo;
|
||||
CONST EFI_PEI_SERVICES **PeiServices;
|
||||
EFI_PEI_CPU_IO_PPI *CpuIo;
|
||||
|
||||
PeiServices = GetPeiServicesTablePointer ();
|
||||
CpuIo = (*PeiServices)->CpuIo;
|
||||
@@ -754,7 +750,7 @@ MmioWrite32 (
|
||||
// Make sure Address is aligned on a 32-bit boundary.
|
||||
//
|
||||
ASSERT ((Address & 3) == 0);
|
||||
CpuIo->MemWrite32 (PeiServices, CpuIo, (UINT64) Address, Value);
|
||||
CpuIo->MemWrite32 (PeiServices, CpuIo, (UINT64)Address, Value);
|
||||
return Value;
|
||||
}
|
||||
|
||||
@@ -776,11 +772,11 @@ MmioWrite32 (
|
||||
UINT64
|
||||
EFIAPI
|
||||
MmioRead64 (
|
||||
IN UINTN Address
|
||||
IN UINTN Address
|
||||
)
|
||||
{
|
||||
CONST EFI_PEI_SERVICES **PeiServices;
|
||||
EFI_PEI_CPU_IO_PPI *CpuIo;
|
||||
CONST EFI_PEI_SERVICES **PeiServices;
|
||||
EFI_PEI_CPU_IO_PPI *CpuIo;
|
||||
|
||||
PeiServices = GetPeiServicesTablePointer ();
|
||||
CpuIo = (*PeiServices)->CpuIo;
|
||||
@@ -789,8 +785,7 @@ MmioRead64 (
|
||||
// Make sure Address is aligned on a 64-bit boundary.
|
||||
//
|
||||
ASSERT ((Address & (sizeof (UINT64) - 1)) == 0);
|
||||
return CpuIo->MemRead64 (PeiServices, CpuIo, (UINT64) Address);
|
||||
|
||||
return CpuIo->MemRead64 (PeiServices, CpuIo, (UINT64)Address);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -810,12 +805,12 @@ MmioRead64 (
|
||||
UINT64
|
||||
EFIAPI
|
||||
MmioWrite64 (
|
||||
IN UINTN Address,
|
||||
IN UINT64 Value
|
||||
IN UINTN Address,
|
||||
IN UINT64 Value
|
||||
)
|
||||
{
|
||||
CONST EFI_PEI_SERVICES **PeiServices;
|
||||
EFI_PEI_CPU_IO_PPI *CpuIo;
|
||||
CONST EFI_PEI_SERVICES **PeiServices;
|
||||
EFI_PEI_CPU_IO_PPI *CpuIo;
|
||||
|
||||
PeiServices = GetPeiServicesTablePointer ();
|
||||
CpuIo = (*PeiServices)->CpuIo;
|
||||
@@ -824,6 +819,6 @@ MmioWrite64 (
|
||||
// Make sure Address is aligned on a 64-bit boundary.
|
||||
//
|
||||
ASSERT ((Address & 7) == 0);
|
||||
CpuIo->MemWrite64 (PeiServices, CpuIo, (UINT64) Address, Value);
|
||||
CpuIo->MemWrite64 (PeiServices, CpuIo, (UINT64)Address, Value);
|
||||
return Value;
|
||||
}
|
||||
|
Reference in New Issue
Block a user