diff options
author | Michael Kubacki <michael.kubacki@microsoft.com> | 2021-12-05 14:53:55 -0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2021-12-07 17:24:28 +0000 |
commit | 731c67e1d77b7741a91762d17659fc9fbcb9e305 (patch) | |
tree | 74c09d31d65dbaf66cc98dfe99b0837a71e6db31 /DynamicTablesPkg/Library/Common/SsdtSerialPortFixupLib/SsdtSerialPortFixupLib.c | |
parent | 7c342378317039e632d9a1a5d4cf7c21aec8cb7a (diff) | |
download | edk2-731c67e1d77b7741a91762d17659fc9fbcb9e305.tar.gz edk2-731c67e1d77b7741a91762d17659fc9fbcb9e305.tar.bz2 edk2-731c67e1d77b7741a91762d17659fc9fbcb9e305.zip |
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>
Diffstat (limited to 'DynamicTablesPkg/Library/Common/SsdtSerialPortFixupLib/SsdtSerialPortFixupLib.c')
-rw-r--r-- | DynamicTablesPkg/Library/Common/SsdtSerialPortFixupLib/SsdtSerialPortFixupLib.c | 103 |
1 files changed, 54 insertions, 49 deletions
diff --git a/DynamicTablesPkg/Library/Common/SsdtSerialPortFixupLib/SsdtSerialPortFixupLib.c b/DynamicTablesPkg/Library/Common/SsdtSerialPortFixupLib/SsdtSerialPortFixupLib.c index 79e1fabc92..0270ab8944 100644 --- a/DynamicTablesPkg/Library/Common/SsdtSerialPortFixupLib/SsdtSerialPortFixupLib.c +++ b/DynamicTablesPkg/Library/Common/SsdtSerialPortFixupLib/SsdtSerialPortFixupLib.c @@ -34,7 +34,7 @@ extern CHAR8 ssdtserialporttemplate_aml_code[]; /** UART address range length.
*/
-#define MIN_UART_ADDRESS_LENGTH 0x1000U
+#define MIN_UART_ADDRESS_LENGTH 0x1000U
/** Validate the Serial Port Information.
@@ -47,15 +47,16 @@ extern CHAR8 ssdtserialporttemplate_aml_code[]; EFI_STATUS
EFIAPI
ValidateSerialPortInfo (
- IN CONST CM_ARM_SERIAL_PORT_INFO * SerialPortInfoTable,
- IN UINT32 SerialPortCount
+ IN CONST CM_ARM_SERIAL_PORT_INFO *SerialPortInfoTable,
+ IN UINT32 SerialPortCount
)
{
- UINT32 Index;
- CONST CM_ARM_SERIAL_PORT_INFO * SerialPortInfo;
+ UINT32 Index;
+ CONST CM_ARM_SERIAL_PORT_INFO *SerialPortInfo;
- if ((SerialPortInfoTable == NULL) ||
- (SerialPortCount == 0)) {
+ if ((SerialPortInfoTable == NULL) ||
+ (SerialPortCount == 0))
+ {
ASSERT (0);
return EFI_INVALID_PARAMETER;
}
@@ -64,8 +65,9 @@ ValidateSerialPortInfo ( SerialPortInfo = &SerialPortInfoTable[Index];
ASSERT (SerialPortInfo != NULL);
- if ((SerialPortInfo == NULL ) ||
- (SerialPortInfo->BaseAddress == 0)) {
+ if ((SerialPortInfo == NULL) ||
+ (SerialPortInfo->BaseAddress == 0))
+ {
DEBUG ((
DEBUG_ERROR,
"ERROR: UART port base address is invalid. BaseAddress = 0x%llx\n",
@@ -83,7 +85,8 @@ ValidateSerialPortInfo ( (SerialPortInfo->PortSubtype !=
EFI_ACPI_DBG2_PORT_SUBTYPE_SERIAL_DCC) &&
(SerialPortInfo->PortSubtype !=
- EFI_ACPI_DBG2_PORT_SUBTYPE_SERIAL_FULL_16550)) {
+ EFI_ACPI_DBG2_PORT_SUBTYPE_SERIAL_FULL_16550))
+ {
DEBUG ((
DEBUG_ERROR,
"ERROR: UART port subtype is invalid."
@@ -97,7 +100,8 @@ ValidateSerialPortInfo ( DEBUG ((DEBUG_INFO, "UART Configuration:\n"));
DEBUG ((
DEBUG_INFO,
- " UART Base = 0x%llx\n", SerialPortInfo->BaseAddress
+ " UART Base = 0x%llx\n",
+ SerialPortInfo->BaseAddress
));
DEBUG ((
DEBUG_INFO,
@@ -129,23 +133,23 @@ STATIC EFI_STATUS
EFIAPI
FixupIds (
- IN AML_ROOT_NODE_HANDLE RootNodeHandle,
- IN CONST UINT64 Uid,
- IN CONST CM_ARM_SERIAL_PORT_INFO * SerialPortInfo
+ IN AML_ROOT_NODE_HANDLE RootNodeHandle,
+ IN CONST UINT64 Uid,
+ IN CONST CM_ARM_SERIAL_PORT_INFO *SerialPortInfo
)
{
- EFI_STATUS Status;
- AML_OBJECT_NODE_HANDLE NameOpIdNode;
- CONST CHAR8 * HidString;
- CONST CHAR8 * CidString;
- CONST CHAR8 * NonBsaHid;
+ EFI_STATUS Status;
+ AML_OBJECT_NODE_HANDLE NameOpIdNode;
+ CONST CHAR8 *HidString;
+ CONST CHAR8 *CidString;
+ CONST CHAR8 *NonBsaHid;
// Get the _CID and _HID value to write.
switch (SerialPortInfo->PortSubtype) {
case EFI_ACPI_DBG2_PORT_SUBTYPE_SERIAL_FULL_16550:
{
// If there is a non-BSA compliant HID, use that.
- NonBsaHid = (CONST CHAR8*)PcdGetPtr (PcdNonBsaCompliant16550SerialHid);
+ NonBsaHid = (CONST CHAR8 *)PcdGetPtr (PcdNonBsaCompliant16550SerialHid);
if ((NonBsaHid != NULL) && (AsciiStrLen (NonBsaHid) != 0)) {
if (!(IsValidPnpId (NonBsaHid) || IsValidAcpiId (NonBsaHid))) {
return EFI_INVALID_PARAMETER;
@@ -157,6 +161,7 @@ FixupIds ( HidString = "PNP0501";
CidString = "PNP0500";
}
+
break;
}
case EFI_ACPI_DBG2_PORT_SUBTYPE_SERIAL_ARM_PL011_UART:
@@ -254,14 +259,14 @@ STATIC EFI_STATUS
EFIAPI
FixupCrs (
- IN AML_ROOT_NODE_HANDLE RootNodeHandle,
- IN CONST CM_ARM_SERIAL_PORT_INFO * SerialPortInfo
+ IN AML_ROOT_NODE_HANDLE RootNodeHandle,
+ IN CONST CM_ARM_SERIAL_PORT_INFO *SerialPortInfo
)
{
- EFI_STATUS Status;
- AML_OBJECT_NODE_HANDLE NameOpCrsNode;
- AML_DATA_NODE_HANDLE QWordRdNode;
- AML_DATA_NODE_HANDLE InterruptRdNode;
+ EFI_STATUS Status;
+ AML_OBJECT_NODE_HANDLE NameOpCrsNode;
+ AML_DATA_NODE_HANDLE QWordRdNode;
+ AML_DATA_NODE_HANDLE InterruptRdNode;
// Get the "_CRS" object defined by the "Name ()" statement.
Status = AmlFindNode (
@@ -288,7 +293,7 @@ FixupCrs ( QWordRdNode,
SerialPortInfo->BaseAddress,
((SerialPortInfo->BaseAddressLength < MIN_UART_ADDRESS_LENGTH) ?
- MIN_UART_ADDRESS_LENGTH: SerialPortInfo->BaseAddressLength)
+ MIN_UART_ADDRESS_LENGTH : SerialPortInfo->BaseAddressLength)
);
if (EFI_ERROR (Status)) {
return Status;
@@ -329,13 +334,13 @@ STATIC EFI_STATUS
EFIAPI
FixupName (
- IN AML_ROOT_NODE_HANDLE RootNodeHandle,
- IN CONST CM_ARM_SERIAL_PORT_INFO * SerialPortInfo,
- IN CONST CHAR8 * Name
+ IN AML_ROOT_NODE_HANDLE RootNodeHandle,
+ IN CONST CM_ARM_SERIAL_PORT_INFO *SerialPortInfo,
+ IN CONST CHAR8 *Name
)
{
- EFI_STATUS Status;
- AML_OBJECT_NODE_HANDLE DeviceNode;
+ EFI_STATUS Status;
+ AML_OBJECT_NODE_HANDLE DeviceNode;
// Get the COM0 variable defined by the "Device ()" statement.
Status = AmlFindNode (RootNodeHandle, "\\_SB_.COM0", &DeviceNode);
@@ -344,7 +349,7 @@ FixupName ( }
// Update the Device's name.
- return AmlDeviceOpUpdateName (DeviceNode, (CHAR8*)Name);
+ return AmlDeviceOpUpdateName (DeviceNode, (CHAR8 *)Name);
}
/** Fixup the Serial Port Information in the AML tree.
@@ -373,14 +378,14 @@ STATIC EFI_STATUS
EFIAPI
FixupSerialPortInfo (
- IN AML_ROOT_NODE_HANDLE RootNodeHandle,
- IN CONST CM_ARM_SERIAL_PORT_INFO * SerialPortInfo,
- IN CONST CHAR8 * Name,
- IN CONST UINT64 Uid,
- OUT EFI_ACPI_DESCRIPTION_HEADER ** Table
+ IN AML_ROOT_NODE_HANDLE RootNodeHandle,
+ IN CONST CM_ARM_SERIAL_PORT_INFO *SerialPortInfo,
+ IN CONST CHAR8 *Name,
+ IN CONST UINT64 Uid,
+ OUT EFI_ACPI_DESCRIPTION_HEADER **Table
)
{
- EFI_STATUS Status;
+ EFI_STATUS Status;
ASSERT (RootNodeHandle != NULL);
ASSERT (SerialPortInfo != NULL);
@@ -415,7 +420,7 @@ FixupSerialPortInfo ( EFI_STATUS
EFIAPI
FreeSsdtSerialPortTable (
- IN EFI_ACPI_DESCRIPTION_HEADER * Table
+ IN EFI_ACPI_DESCRIPTION_HEADER *Table
)
{
ASSERT (Table != NULL);
@@ -443,16 +448,16 @@ FreeSsdtSerialPortTable ( EFI_STATUS
EFIAPI
BuildSsdtSerialPortTable (
- IN CONST CM_STD_OBJ_ACPI_TABLE_INFO * AcpiTableInfo,
- IN CONST CM_ARM_SERIAL_PORT_INFO * SerialPortInfo,
- IN CONST CHAR8 * Name,
- IN CONST UINT64 Uid,
- OUT EFI_ACPI_DESCRIPTION_HEADER ** Table
+ IN CONST CM_STD_OBJ_ACPI_TABLE_INFO *AcpiTableInfo,
+ IN CONST CM_ARM_SERIAL_PORT_INFO *SerialPortInfo,
+ IN CONST CHAR8 *Name,
+ IN CONST UINT64 Uid,
+ OUT EFI_ACPI_DESCRIPTION_HEADER **Table
)
{
- EFI_STATUS Status;
- EFI_STATUS Status1;
- AML_ROOT_NODE_HANDLE RootNodeHandle;
+ EFI_STATUS Status;
+ EFI_STATUS Status1;
+ AML_ROOT_NODE_HANDLE RootNodeHandle;
ASSERT (AcpiTableInfo != NULL);
ASSERT (SerialPortInfo != NULL);
@@ -467,7 +472,7 @@ BuildSsdtSerialPortTable ( // Parse the SSDT Serial Port Template.
Status = AmlParseDefinitionBlock (
- (EFI_ACPI_DESCRIPTION_HEADER*)ssdtserialporttemplate_aml_code,
+ (EFI_ACPI_DESCRIPTION_HEADER *)ssdtserialporttemplate_aml_code,
&RootNodeHandle
);
if (EFI_ERROR (Status)) {
|