ShellPkg: Apply uncrustify changes
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737 Apply uncrustify changes to .c/.h files in the ShellPkg 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: Ray Ni <ray.ni@intel.com>
This commit is contained in:
committed by
mergify[bot]
parent
c411b485b6
commit
47d20b54f9
@ -12,16 +12,16 @@
|
||||
#include "AcpiView.h"
|
||||
#include "AcpiViewConfig.h"
|
||||
|
||||
STATIC UINT32 gIndent;
|
||||
STATIC UINT32 mTableErrorCount;
|
||||
STATIC UINT32 mTableWarningCount;
|
||||
STATIC UINT32 gIndent;
|
||||
STATIC UINT32 mTableErrorCount;
|
||||
STATIC UINT32 mTableWarningCount;
|
||||
|
||||
STATIC ACPI_DESCRIPTION_HEADER_INFO AcpiHdrInfo;
|
||||
STATIC ACPI_DESCRIPTION_HEADER_INFO AcpiHdrInfo;
|
||||
|
||||
/**
|
||||
An ACPI_PARSER array describing the ACPI header.
|
||||
**/
|
||||
STATIC CONST ACPI_PARSER AcpiHeaderParser[] = {
|
||||
STATIC CONST ACPI_PARSER AcpiHeaderParser[] = {
|
||||
PARSE_ACPI_HEADER (&AcpiHdrInfo)
|
||||
};
|
||||
|
||||
@ -113,21 +113,21 @@ IncrementWarningCount (
|
||||
BOOLEAN
|
||||
EFIAPI
|
||||
VerifyChecksum (
|
||||
IN BOOLEAN Log,
|
||||
IN UINT8* Ptr,
|
||||
IN UINT32 Length
|
||||
IN BOOLEAN Log,
|
||||
IN UINT8 *Ptr,
|
||||
IN UINT32 Length
|
||||
)
|
||||
{
|
||||
UINTN ByteCount;
|
||||
UINT8 Checksum;
|
||||
UINTN OriginalAttribute;
|
||||
UINTN ByteCount;
|
||||
UINT8 Checksum;
|
||||
UINTN OriginalAttribute;
|
||||
|
||||
//
|
||||
// set local variables to suppress incorrect compiler/analyzer warnings
|
||||
//
|
||||
OriginalAttribute = 0;
|
||||
ByteCount = 0;
|
||||
Checksum = 0;
|
||||
ByteCount = 0;
|
||||
Checksum = 0;
|
||||
|
||||
while (ByteCount < Length) {
|
||||
Checksum += *(Ptr++);
|
||||
@ -140,22 +140,29 @@ VerifyChecksum (
|
||||
if (GetColourHighlighting ()) {
|
||||
gST->ConOut->SetAttribute (
|
||||
gST->ConOut,
|
||||
EFI_TEXT_ATTR (EFI_GREEN,
|
||||
((OriginalAttribute&(BIT4|BIT5|BIT6))>>4))
|
||||
EFI_TEXT_ATTR (
|
||||
EFI_GREEN,
|
||||
((OriginalAttribute&(BIT4|BIT5|BIT6))>>4)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
Print (L"Table Checksum : OK\n\n");
|
||||
} else {
|
||||
IncrementErrorCount ();
|
||||
if (GetColourHighlighting ()) {
|
||||
gST->ConOut->SetAttribute (
|
||||
gST->ConOut,
|
||||
EFI_TEXT_ATTR (EFI_RED,
|
||||
((OriginalAttribute&(BIT4|BIT5|BIT6))>>4))
|
||||
EFI_TEXT_ATTR (
|
||||
EFI_RED,
|
||||
((OriginalAttribute&(BIT4|BIT5|BIT6))>>4)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
Print (L"Table Checksum : FAILED (0x%X)\n\n", Checksum);
|
||||
}
|
||||
|
||||
if (GetColourHighlighting ()) {
|
||||
gST->ConOut->SetAttribute (gST->ConOut, OriginalAttribute);
|
||||
}
|
||||
@ -173,16 +180,16 @@ VerifyChecksum (
|
||||
VOID
|
||||
EFIAPI
|
||||
DumpRaw (
|
||||
IN UINT8* Ptr,
|
||||
IN UINT32 Length
|
||||
IN UINT8 *Ptr,
|
||||
IN UINT32 Length
|
||||
)
|
||||
{
|
||||
UINTN ByteCount;
|
||||
UINTN PartLineChars;
|
||||
UINTN AsciiBufferIndex;
|
||||
CHAR8 AsciiBuffer[17];
|
||||
UINTN ByteCount;
|
||||
UINTN PartLineChars;
|
||||
UINTN AsciiBufferIndex;
|
||||
CHAR8 AsciiBuffer[17];
|
||||
|
||||
ByteCount = 0;
|
||||
ByteCount = 0;
|
||||
AsciiBufferIndex = 0;
|
||||
|
||||
Print (L"Address : 0x%p\n", Ptr);
|
||||
@ -216,6 +223,7 @@ DumpRaw (
|
||||
if ((Length & 0x0F) <= 8) {
|
||||
PartLineChars += 2;
|
||||
}
|
||||
|
||||
while (PartLineChars > 0) {
|
||||
Print (L" ");
|
||||
PartLineChars--;
|
||||
@ -236,8 +244,8 @@ DumpRaw (
|
||||
VOID
|
||||
EFIAPI
|
||||
DumpUint8 (
|
||||
IN CONST CHAR16* Format,
|
||||
IN UINT8* Ptr
|
||||
IN CONST CHAR16 *Format,
|
||||
IN UINT8 *Ptr
|
||||
)
|
||||
{
|
||||
Print (Format, *Ptr);
|
||||
@ -252,11 +260,11 @@ DumpUint8 (
|
||||
VOID
|
||||
EFIAPI
|
||||
DumpUint16 (
|
||||
IN CONST CHAR16* Format,
|
||||
IN UINT8* Ptr
|
||||
IN CONST CHAR16 *Format,
|
||||
IN UINT8 *Ptr
|
||||
)
|
||||
{
|
||||
Print (Format, *(UINT16*)Ptr);
|
||||
Print (Format, *(UINT16 *)Ptr);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -268,11 +276,11 @@ DumpUint16 (
|
||||
VOID
|
||||
EFIAPI
|
||||
DumpUint32 (
|
||||
IN CONST CHAR16* Format,
|
||||
IN UINT8* Ptr
|
||||
IN CONST CHAR16 *Format,
|
||||
IN UINT8 *Ptr
|
||||
)
|
||||
{
|
||||
Print (Format, *(UINT32*)Ptr);
|
||||
Print (Format, *(UINT32 *)Ptr);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -284,19 +292,19 @@ DumpUint32 (
|
||||
VOID
|
||||
EFIAPI
|
||||
DumpUint64 (
|
||||
IN CONST CHAR16* Format,
|
||||
IN UINT8* Ptr
|
||||
IN CONST CHAR16 *Format,
|
||||
IN UINT8 *Ptr
|
||||
)
|
||||
{
|
||||
// Some fields are not aligned and this causes alignment faults
|
||||
// on ARM platforms if the compiler generates LDRD instructions.
|
||||
// Perform word access so that LDRD instructions are not generated.
|
||||
UINT64 Val;
|
||||
UINT64 Val;
|
||||
|
||||
Val = *(UINT32*)(Ptr + sizeof (UINT32));
|
||||
Val = *(UINT32 *)(Ptr + sizeof (UINT32));
|
||||
|
||||
Val = LShiftU64(Val,32);
|
||||
Val |= (UINT64)*(UINT32*)Ptr;
|
||||
Val = LShiftU64 (Val, 32);
|
||||
Val |= (UINT64)*(UINT32 *)Ptr;
|
||||
|
||||
Print (Format, Val);
|
||||
}
|
||||
@ -313,8 +321,8 @@ DumpUint64 (
|
||||
VOID
|
||||
EFIAPI
|
||||
Dump3Chars (
|
||||
IN CONST CHAR16* Format OPTIONAL,
|
||||
IN UINT8* Ptr
|
||||
IN CONST CHAR16 *Format OPTIONAL,
|
||||
IN UINT8 *Ptr
|
||||
)
|
||||
{
|
||||
Print (
|
||||
@ -337,8 +345,8 @@ Dump3Chars (
|
||||
VOID
|
||||
EFIAPI
|
||||
Dump4Chars (
|
||||
IN CONST CHAR16* Format OPTIONAL,
|
||||
IN UINT8* Ptr
|
||||
IN CONST CHAR16 *Format OPTIONAL,
|
||||
IN UINT8 *Ptr
|
||||
)
|
||||
{
|
||||
Print (
|
||||
@ -362,8 +370,8 @@ Dump4Chars (
|
||||
VOID
|
||||
EFIAPI
|
||||
Dump6Chars (
|
||||
IN CONST CHAR16* Format OPTIONAL,
|
||||
IN UINT8* Ptr
|
||||
IN CONST CHAR16 *Format OPTIONAL,
|
||||
IN UINT8 *Ptr
|
||||
)
|
||||
{
|
||||
Print (
|
||||
@ -389,8 +397,8 @@ Dump6Chars (
|
||||
VOID
|
||||
EFIAPI
|
||||
Dump8Chars (
|
||||
IN CONST CHAR16* Format OPTIONAL,
|
||||
IN UINT8* Ptr
|
||||
IN CONST CHAR16 *Format OPTIONAL,
|
||||
IN UINT8 *Ptr
|
||||
)
|
||||
{
|
||||
Print (
|
||||
@ -418,8 +426,8 @@ Dump8Chars (
|
||||
VOID
|
||||
EFIAPI
|
||||
Dump12Chars (
|
||||
IN CONST CHAR16* Format OPTIONAL,
|
||||
IN UINT8* Ptr
|
||||
IN CONST CHAR16 *Format OPTIONAL,
|
||||
IN UINT8 *Ptr
|
||||
)
|
||||
{
|
||||
Print (
|
||||
@ -454,9 +462,9 @@ Dump12Chars (
|
||||
VOID
|
||||
EFIAPI
|
||||
PrintFieldName (
|
||||
IN UINT32 Indent,
|
||||
IN CONST CHAR16* FieldName
|
||||
)
|
||||
IN UINT32 Indent,
|
||||
IN CONST CHAR16 *FieldName
|
||||
)
|
||||
{
|
||||
Print (
|
||||
L"%*a%-*s : ",
|
||||
@ -498,38 +506,41 @@ EFIAPI
|
||||
ParseAcpi (
|
||||
IN BOOLEAN Trace,
|
||||
IN UINT32 Indent,
|
||||
IN CONST CHAR8* AsciiName OPTIONAL,
|
||||
IN UINT8* Ptr,
|
||||
IN CONST CHAR8 *AsciiName OPTIONAL,
|
||||
IN UINT8 *Ptr,
|
||||
IN UINT32 Length,
|
||||
IN CONST ACPI_PARSER* Parser,
|
||||
IN CONST ACPI_PARSER *Parser,
|
||||
IN UINT32 ParserItems
|
||||
)
|
||||
)
|
||||
{
|
||||
UINT32 Index;
|
||||
UINT32 Offset;
|
||||
BOOLEAN HighLight;
|
||||
UINTN OriginalAttribute;
|
||||
UINT32 Index;
|
||||
UINT32 Offset;
|
||||
BOOLEAN HighLight;
|
||||
UINTN OriginalAttribute;
|
||||
|
||||
//
|
||||
// set local variables to suppress incorrect compiler/analyzer warnings
|
||||
//
|
||||
OriginalAttribute = 0;
|
||||
Offset = 0;
|
||||
Offset = 0;
|
||||
|
||||
// Increment the Indent
|
||||
gIndent += Indent;
|
||||
|
||||
if (Trace && (AsciiName != NULL)){
|
||||
if (Trace && (AsciiName != NULL)) {
|
||||
HighLight = GetColourHighlighting ();
|
||||
|
||||
if (HighLight) {
|
||||
OriginalAttribute = gST->ConOut->Mode->Attribute;
|
||||
gST->ConOut->SetAttribute (
|
||||
gST->ConOut,
|
||||
EFI_TEXT_ATTR(EFI_YELLOW,
|
||||
((OriginalAttribute&(BIT4|BIT5|BIT6))>>4))
|
||||
EFI_TEXT_ATTR (
|
||||
EFI_YELLOW,
|
||||
((OriginalAttribute&(BIT4|BIT5|BIT6))>>4)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
Print (
|
||||
L"%*a%-*a :\n",
|
||||
gIndent,
|
||||
@ -544,7 +555,6 @@ ParseAcpi (
|
||||
|
||||
for (Index = 0; Index < ParserItems; Index++) {
|
||||
if ((Offset + Parser[Index].Length) > Length) {
|
||||
|
||||
// For fields outside the buffer length provided, reset any pointers
|
||||
// which were supposed to be updated by this function call
|
||||
if (Parser[Index].ItemPtr != NULL) {
|
||||
@ -556,11 +566,12 @@ ParseAcpi (
|
||||
}
|
||||
|
||||
if (GetConsistencyChecking () &&
|
||||
(Offset != Parser[Index].Offset)) {
|
||||
(Offset != Parser[Index].Offset))
|
||||
{
|
||||
IncrementErrorCount ();
|
||||
Print (
|
||||
L"\nERROR: %a: Offset Mismatch for %s\n"
|
||||
L"CurrentOffset = %d FieldOffset = %d\n",
|
||||
L"CurrentOffset = %d FieldOffset = %d\n",
|
||||
AsciiName,
|
||||
Parser[Index].NameStr,
|
||||
Offset,
|
||||
@ -597,20 +608,23 @@ ParseAcpi (
|
||||
);
|
||||
} // switch
|
||||
}
|
||||
|
||||
// Validating only makes sense if we are tracing
|
||||
// the parsed table entries, to report by table name.
|
||||
if (GetConsistencyChecking () &&
|
||||
(Parser[Index].FieldValidator != NULL)) {
|
||||
(Parser[Index].FieldValidator != NULL))
|
||||
{
|
||||
Parser[Index].FieldValidator (Ptr, Parser[Index].Context);
|
||||
}
|
||||
|
||||
Print (L"\n");
|
||||
} // if (Trace)
|
||||
|
||||
if (Parser[Index].ItemPtr != NULL) {
|
||||
*Parser[Index].ItemPtr = (VOID*)Ptr;
|
||||
*Parser[Index].ItemPtr = (VOID *)Ptr;
|
||||
}
|
||||
|
||||
Ptr += Parser[Index].Length;
|
||||
Ptr += Parser[Index].Length;
|
||||
Offset += Parser[Index].Length;
|
||||
} // for
|
||||
|
||||
@ -624,12 +638,12 @@ ParseAcpi (
|
||||
The GasParser array is used by the ParseAcpi function to parse and/or trace
|
||||
the GAS structure.
|
||||
**/
|
||||
STATIC CONST ACPI_PARSER GasParser[] = {
|
||||
{L"Address Space ID", 1, 0, L"0x%x", NULL, NULL, NULL, NULL},
|
||||
{L"Register Bit Width", 1, 1, L"0x%x", NULL, NULL, NULL, NULL},
|
||||
{L"Register Bit Offset", 1, 2, L"0x%x", NULL, NULL, NULL, NULL},
|
||||
{L"Access Size", 1, 3, L"0x%x", NULL, NULL, NULL, NULL},
|
||||
{L"Address", 8, 4, L"0x%lx", NULL, NULL, NULL, NULL}
|
||||
STATIC CONST ACPI_PARSER GasParser[] = {
|
||||
{ L"Address Space ID", 1, 0, L"0x%x", NULL, NULL, NULL, NULL },
|
||||
{ L"Register Bit Width", 1, 1, L"0x%x", NULL, NULL, NULL, NULL },
|
||||
{ L"Register Bit Offset", 1, 2, L"0x%x", NULL, NULL, NULL, NULL },
|
||||
{ L"Access Size", 1, 3, L"0x%x", NULL, NULL, NULL, NULL },
|
||||
{ L"Address", 8, 4, L"0x%lx", NULL, NULL, NULL, NULL }
|
||||
};
|
||||
|
||||
/**
|
||||
@ -644,9 +658,9 @@ STATIC CONST ACPI_PARSER GasParser[] = {
|
||||
UINT32
|
||||
EFIAPI
|
||||
DumpGasStruct (
|
||||
IN UINT8* Ptr,
|
||||
IN UINT32 Indent,
|
||||
IN UINT32 Length
|
||||
IN UINT8 *Ptr,
|
||||
IN UINT32 Indent,
|
||||
IN UINT32 Length
|
||||
)
|
||||
{
|
||||
Print (L"\n");
|
||||
@ -669,8 +683,8 @@ DumpGasStruct (
|
||||
VOID
|
||||
EFIAPI
|
||||
DumpGas (
|
||||
IN CONST CHAR16* Format OPTIONAL,
|
||||
IN UINT8* Ptr
|
||||
IN CONST CHAR16 *Format OPTIONAL,
|
||||
IN UINT8 *Ptr
|
||||
)
|
||||
{
|
||||
DumpGasStruct (Ptr, 2, sizeof (EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE));
|
||||
@ -686,7 +700,7 @@ DumpGas (
|
||||
UINT32
|
||||
EFIAPI
|
||||
DumpAcpiHeader (
|
||||
IN UINT8* Ptr
|
||||
IN UINT8 *Ptr
|
||||
)
|
||||
{
|
||||
return ParseAcpi (
|
||||
@ -715,13 +729,13 @@ DumpAcpiHeader (
|
||||
UINT32
|
||||
EFIAPI
|
||||
ParseAcpiHeader (
|
||||
IN UINT8* Ptr,
|
||||
OUT CONST UINT32** Signature,
|
||||
OUT CONST UINT32** Length,
|
||||
OUT CONST UINT8** Revision
|
||||
IN UINT8 *Ptr,
|
||||
OUT CONST UINT32 **Signature,
|
||||
OUT CONST UINT32 **Length,
|
||||
OUT CONST UINT8 **Revision
|
||||
)
|
||||
{
|
||||
UINT32 BytesParsed;
|
||||
UINT32 BytesParsed;
|
||||
|
||||
BytesParsed = ParseAcpi (
|
||||
FALSE,
|
||||
@ -733,8 +747,8 @@ ParseAcpiHeader (
|
||||
);
|
||||
|
||||
*Signature = AcpiHdrInfo.Signature;
|
||||
*Length = AcpiHdrInfo.Length;
|
||||
*Revision = AcpiHdrInfo.Revision;
|
||||
*Length = AcpiHdrInfo.Length;
|
||||
*Revision = AcpiHdrInfo.Revision;
|
||||
|
||||
return BytesParsed;
|
||||
}
|
||||
|
Reference in New Issue
Block a user