DynamicTablesPkg: Apply uncrustify changes

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

Apply uncrustify changes to .c/.h files in the DynamicTablesPkg 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: Sami Mujawar <sami.mujawar@arm.com>
This commit is contained in:
Michael Kubacki
2021-12-05 14:53:55 -08:00
committed by mergify[bot]
parent 7c34237831
commit 731c67e1d7
85 changed files with 5347 additions and 4795 deletions

View File

@@ -23,25 +23,26 @@
EFI_STATUS
EFIAPI
AmlStreamInit (
IN OUT AML_STREAM * Stream,
IN UINT8 * Buffer,
IN UINT32 MaxBufferSize,
IN EAML_STREAM_DIRECTION Direction
IN OUT AML_STREAM *Stream,
IN UINT8 *Buffer,
IN UINT32 MaxBufferSize,
IN EAML_STREAM_DIRECTION Direction
)
{
if ((Stream == NULL) ||
(Buffer == NULL) ||
(MaxBufferSize == 0) ||
((Direction != EAmlStreamDirectionForward) &&
(Direction != EAmlStreamDirectionBackward))) {
(Direction != EAmlStreamDirectionBackward)))
{
ASSERT (0);
return EFI_INVALID_PARAMETER;
}
Stream->Buffer = Buffer;
Stream->Buffer = Buffer;
Stream->MaxBufferSize = MaxBufferSize;
Stream->Index = 0;
Stream->Direction = Direction;
Stream->Index = 0;
Stream->Direction = Direction;
return EFI_SUCCESS;
}
@@ -60,20 +61,21 @@ AmlStreamInit (
EFI_STATUS
EFIAPI
AmlStreamClone (
IN CONST AML_STREAM * Stream,
OUT AML_STREAM * ClonedStream
IN CONST AML_STREAM *Stream,
OUT AML_STREAM *ClonedStream
)
{
if (!IS_STREAM (Stream) ||
(ClonedStream == NULL)) {
(ClonedStream == NULL))
{
ASSERT (0);
return EFI_INVALID_PARAMETER;
}
ClonedStream->Buffer = Stream->Buffer;
ClonedStream->Buffer = Stream->Buffer;
ClonedStream->MaxBufferSize = Stream->MaxBufferSize;
ClonedStream->Index = Stream->Index;
ClonedStream->Direction = Stream->Direction;
ClonedStream->Index = Stream->Index;
ClonedStream->Direction = Stream->Direction;
return EFI_SUCCESS;
}
@@ -105,12 +107,13 @@ AmlStreamClone (
EFI_STATUS
EFIAPI
AmlStreamInitSubStream (
IN CONST AML_STREAM * Stream,
OUT AML_STREAM * SubStream
IN CONST AML_STREAM *Stream,
OUT AML_STREAM *SubStream
)
{
if (!IS_STREAM (Stream) ||
(SubStream == NULL)) {
(SubStream == NULL))
{
ASSERT (0);
return EFI_INVALID_PARAMETER;
}
@@ -125,8 +128,8 @@ AmlStreamInitSubStream (
}
SubStream->MaxBufferSize = AmlStreamGetFreeSpace (Stream);
SubStream->Index = 0;
SubStream->Direction = Stream->Direction;
SubStream->Index = 0;
SubStream->Direction = Stream->Direction;
return EFI_SUCCESS;
}
@@ -141,13 +144,14 @@ AmlStreamInitSubStream (
UINT8 *
EFIAPI
AmlStreamGetBuffer (
IN CONST AML_STREAM * Stream
IN CONST AML_STREAM *Stream
)
{
if (!IS_STREAM (Stream)) {
ASSERT (0);
return NULL;
}
return Stream->Buffer;
}
@@ -161,13 +165,14 @@ AmlStreamGetBuffer (
UINT32
EFIAPI
AmlStreamGetMaxBufferSize (
IN CONST AML_STREAM * Stream
IN CONST AML_STREAM *Stream
)
{
if (!IS_STREAM (Stream)) {
ASSERT (0);
return 0;
}
return Stream->MaxBufferSize;
}
@@ -183,13 +188,14 @@ AmlStreamGetMaxBufferSize (
EFI_STATUS
EFIAPI
AmlStreamReduceMaxBufferSize (
IN AML_STREAM * Stream,
IN UINT32 Diff
IN AML_STREAM *Stream,
IN UINT32 Diff
)
{
if (!IS_STREAM (Stream) ||
(Diff == 0) ||
((Stream->MaxBufferSize - Diff) <= Stream->Index)) {
((Stream->MaxBufferSize - Diff) <= Stream->Index))
{
ASSERT (0);
return EFI_INVALID_PARAMETER;
}
@@ -214,13 +220,14 @@ AmlStreamReduceMaxBufferSize (
UINT32
EFIAPI
AmlStreamGetIndex (
IN CONST AML_STREAM * Stream
IN CONST AML_STREAM *Stream
)
{
if (!IS_STREAM (Stream)) {
ASSERT (0);
return 0;
}
return Stream->Index;
}
@@ -234,13 +241,14 @@ AmlStreamGetIndex (
EAML_STREAM_DIRECTION
EFIAPI
AmlStreamGetDirection (
IN CONST AML_STREAM * Stream
IN CONST AML_STREAM *Stream
)
{
if (!IS_STREAM (Stream)) {
ASSERT (0);
return EAmlStreamDirectionInvalid;
}
return Stream->Direction;
}
@@ -254,7 +262,7 @@ AmlStreamGetDirection (
UINT8 *
EFIAPI
AmlStreamGetCurrPos (
IN CONST AML_STREAM * Stream
IN CONST AML_STREAM *Stream
)
{
if (!IS_STREAM (Stream)) {
@@ -282,7 +290,7 @@ AmlStreamGetCurrPos (
UINT32
EFIAPI
AmlStreamGetFreeSpace (
IN CONST AML_STREAM * Stream
IN CONST AML_STREAM *Stream
)
{
if (!IS_STREAM (Stream)) {
@@ -314,13 +322,14 @@ AmlStreamGetFreeSpace (
EFI_STATUS
EFIAPI
AmlStreamProgress (
IN AML_STREAM * Stream,
IN UINT32 Offset
IN AML_STREAM *Stream,
IN UINT32 Offset
)
{
if (!IS_STREAM (Stream) ||
IS_END_OF_STREAM (Stream) ||
(Offset == 0)) {
IS_END_OF_STREAM (Stream) ||
(Offset == 0))
{
ASSERT (0);
return EFI_INVALID_PARAMETER;
}
@@ -350,12 +359,13 @@ AmlStreamProgress (
EFI_STATUS
EFIAPI
AmlStreamRewind (
IN AML_STREAM * Stream,
IN UINT32 Offset
IN AML_STREAM *Stream,
IN UINT32 Offset
)
{
if (!IS_STREAM (Stream) ||
(Offset == 0)) {
(Offset == 0))
{
ASSERT (0);
return EFI_INVALID_PARAMETER;
}
@@ -380,7 +390,7 @@ AmlStreamRewind (
EFI_STATUS
EFIAPI
AmlStreamReset (
IN AML_STREAM * Stream
IN AML_STREAM *Stream
)
{
if (!IS_STREAM (Stream)) {
@@ -409,15 +419,16 @@ AmlStreamReset (
EFI_STATUS
EFIAPI
AmlStreamPeekByte (
IN AML_STREAM * Stream,
OUT UINT8 * OutByte
IN AML_STREAM *Stream,
OUT UINT8 *OutByte
)
{
UINT8 * CurPos;
UINT8 *CurPos;
if (!IS_STREAM (Stream) ||
IS_END_OF_STREAM (Stream) ||
(OutByte == NULL)) {
(OutByte == NULL))
{
ASSERT (0);
return EFI_INVALID_PARAMETER;
}
@@ -448,15 +459,16 @@ AmlStreamPeekByte (
EFI_STATUS
EFIAPI
AmlStreamReadByte (
IN AML_STREAM * Stream,
OUT UINT8 * OutByte
IN AML_STREAM *Stream,
OUT UINT8 *OutByte
)
{
EFI_STATUS Status;
EFI_STATUS Status;
if (!IS_STREAM (Stream) ||
IS_END_OF_STREAM (Stream) ||
(OutByte == NULL)) {
(OutByte == NULL))
{
ASSERT (0);
return EFI_INVALID_PARAMETER;
}
@@ -498,17 +510,18 @@ AmlStreamReadByte (
EFI_STATUS
EFIAPI
AmlStreamWrite (
IN AML_STREAM * Stream,
IN CONST UINT8 * Buffer,
IN UINT32 Size
IN AML_STREAM *Stream,
IN CONST UINT8 *Buffer,
IN UINT32 Size
)
{
UINT8 * CurrPos;
UINT8 *CurrPos;
if (!IS_STREAM (Stream) ||
IS_END_OF_STREAM (Stream) ||
(Buffer == NULL) ||
(Size == 0)) {
(Size == 0))
{
ASSERT (0);
return EFI_INVALID_PARAMETER;
}
@@ -554,21 +567,22 @@ AmlStreamWrite (
BOOLEAN
EFIAPI
AmlStreamCmp (
IN CONST AML_STREAM * Stream1,
IN CONST AML_STREAM * Stream2,
IN UINT32 Size
IN CONST AML_STREAM *Stream1,
IN CONST AML_STREAM *Stream2,
IN UINT32 Size
)
{
UINT32 MinSize;
UINT8 * CurrPosStream1;
UINT8 * CurrPosStream2;
UINT32 MinSize;
UINT8 *CurrPosStream1;
UINT8 *CurrPosStream2;
if (!IS_STREAM (Stream1) ||
IS_END_OF_STREAM (Stream1) ||
!IS_STREAM (Stream2) ||
IS_END_OF_STREAM (Stream2) ||
(Stream1->Direction != Stream2->Direction) ||
(Size == 0)) {
(Size == 0))
{
ASSERT (0);
return FALSE;
}
@@ -589,6 +603,7 @@ AmlStreamCmp (
ASSERT (0);
return FALSE;
}
CurrPosStream2 = AmlStreamGetCurrPos (Stream2);
if (CurrPosStream2 == NULL) {
ASSERT (0);
@@ -606,10 +621,10 @@ AmlStreamCmp (
// ^
// CurrPos
return (0 == CompareMem (
CurrPosStream1 - (MinSize - 1),
CurrPosStream2 - (MinSize - 1),
MinSize
));
CurrPosStream1 - (MinSize - 1),
CurrPosStream2 - (MinSize - 1),
MinSize
));
}
/** Copy Size bytes of the stream's data to DstBuffer.
@@ -633,19 +648,20 @@ AmlStreamCmp (
EFI_STATUS
EFIAPI
AmlStreamCpyS (
OUT CHAR8 * DstBuffer,
IN UINT32 MaxDstBufferSize,
IN AML_STREAM * Stream,
IN UINT32 Size
OUT CHAR8 *DstBuffer,
IN UINT32 MaxDstBufferSize,
IN AML_STREAM *Stream,
IN UINT32 Size
)
{
CHAR8 * StreamBufferStart;
CHAR8 *StreamBufferStart;
// Stream is checked in the function call.
if ((DstBuffer == NULL) ||
(MaxDstBufferSize == 0) ||
(Size > MaxDstBufferSize) ||
(Size > AmlStreamGetMaxBufferSize (Stream))) {
(Size > AmlStreamGetMaxBufferSize (Stream)))
{
ASSERT (0);
return EFI_INVALID_PARAMETER;
}
@@ -655,9 +671,9 @@ AmlStreamCpyS (
}
// Find the address at which the data is starting.
StreamBufferStart = (CHAR8*)(IS_STREAM_FORWARD (Stream) ?
Stream->Buffer :
AmlStreamGetCurrPos (Stream));
StreamBufferStart = (CHAR8 *)(IS_STREAM_FORWARD (Stream) ?
Stream->Buffer :
AmlStreamGetCurrPos (Stream));
CopyMem (DstBuffer, StreamBufferStart, Size);