From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mx.groups.io with SMTP id smtpd.web10.3332.1662518245388727683 for ; Tue, 06 Sep 2022 19:37:25 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@linux.microsoft.com header.s=default header.b=Z8CvuyqX; spf=pass (domain: linux.microsoft.com, ip: 13.77.154.182, mailfrom: mikuback@linux.microsoft.com) Received: from localhost.localdomain (unknown [47.195.228.134]) by linux.microsoft.com (Postfix) with ESMTPSA id 548DA20B929D; Tue, 6 Sep 2022 19:37:24 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 548DA20B929D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1662518245; bh=0Oov6L19vhqY9LpUDJyTdPlWOE/XPaZGrtOQcfRq9Ug=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Z8CvuyqXTRvbS6npBxOf/yVjWwzBiRqpuqSh4WVnJ9wqn3Tylb6pxdxgTO14VHK8r Ykj0UdEh27gC35vRZ15nPlNTr6kuIObYhZXdDISjsj5Gt/C3sY6WOd6857OrS0jNhm kaqcBz6PAeqNyNlWioIWstTiQbCg2WmM/QovYJHA= From: "Michael Kubacki" To: devel@edk2.groups.io Cc: Leif Lindholm , Ard Biesheuvel , Abner Chang , Daniel Schaefer Subject: [PATCH v1 1/3] EmbeddedPkg/AcpiLib: Fix code formatting errors Date: Tue, 6 Sep 2022 22:36:47 -0400 Message-Id: <20220907023649.312-2-mikuback@linux.microsoft.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20220907023649.312-1-mikuback@linux.microsoft.com> References: <20220907023649.312-1-mikuback@linux.microsoft.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Michael Kubacki REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3D4046 This package did not have CI enabled so code changes were merged that fail uncrustify formatting. This change updates those files to include uncustify formatting. Cc: Leif Lindholm Cc: Ard Biesheuvel Cc: Abner Chang Cc: Daniel Schaefer Signed-off-by: Michael Kubacki --- EmbeddedPkg/Library/AcpiLib/AcpiLib.c | 88 ++++++++++---------- EmbeddedPkg/Include/Library/AcpiLib.h | 22 ++--- 2 files changed, 56 insertions(+), 54 deletions(-) diff --git a/EmbeddedPkg/Library/AcpiLib/AcpiLib.c b/EmbeddedPkg/Library/= AcpiLib/AcpiLib.c index ea2ad63b2039..cb593a7b2a3a 100644 --- a/EmbeddedPkg/Library/AcpiLib/AcpiLib.c +++ b/EmbeddedPkg/Library/AcpiLib/AcpiLib.c @@ -192,13 +192,13 @@ LocateAndInstallAcpiFromFv ( EFI_STATUS EFIAPI AcpiUpdateChecksum ( - IN OUT UINT8 *Buffer, - IN UINTN Size + IN OUT UINT8 *Buffer, + IN UINTN Size ) { - UINTN ChecksumOffset; + UINTN ChecksumOffset; =20 - if (Buffer =3D=3D NULL || Size =3D=3D 0) { + if ((Buffer =3D=3D NULL) || (Size =3D=3D 0)) { return EFI_INVALID_PARAMETER; } =20 @@ -237,11 +237,11 @@ AcpiUpdateChecksum ( EFI_STATUS EFIAPI AcpiLocateTableBySignature ( - IN EFI_ACPI_SDT_PROTOCOL *AcpiSdtProtocol, - IN UINT32 TableSignature, - IN OUT UINTN *Index, - OUT EFI_ACPI_DESCRIPTION_HEADER **Table, - OUT UINTN *TableKey + IN EFI_ACPI_SDT_PROTOCOL *AcpiSdtProtocol, + IN UINT32 TableSignature, + IN OUT UINTN *Index, + OUT EFI_ACPI_DESCRIPTION_HEADER **Table, + OUT UINTN *TableKey ) { EFI_STATUS Status; @@ -249,9 +249,10 @@ AcpiLocateTableBySignature ( EFI_ACPI_TABLE_VERSION TableVersion; UINTN TableIndex; =20 - if (AcpiSdtProtocol =3D=3D NULL - || Table =3D=3D NULL - || TableKey =3D=3D NULL) { + if ( (AcpiSdtProtocol =3D=3D NULL) + || (Table =3D=3D NULL) + || (TableKey =3D=3D NULL)) + { return EFI_INVALID_PARAMETER; } =20 @@ -261,7 +262,7 @@ AcpiLocateTableBySignature ( // Search for ACPI Table with matching signature // TableVersion =3D 0; - TableIndex =3D *Index; + TableIndex =3D *Index; while (!EFI_ERROR (Status)) { Status =3D AcpiSdtProtocol->GetAcpiTable ( TableIndex, @@ -301,26 +302,26 @@ AcpiLocateTableBySignature ( EFI_STATUS EFIAPI AcpiAmlObjectUpdateInteger ( - IN EFI_ACPI_SDT_PROTOCOL *AcpiSdtProtocol, - IN EFI_ACPI_HANDLE TableHandle, - IN CHAR8 *AsciiObjectPath, - IN UINTN Value + IN EFI_ACPI_SDT_PROTOCOL *AcpiSdtProtocol, + IN EFI_ACPI_HANDLE TableHandle, + IN CHAR8 *AsciiObjectPath, + IN UINTN Value ) { - EFI_STATUS Status; - EFI_ACPI_HANDLE ObjectHandle; - EFI_ACPI_HANDLE DataHandle; - EFI_ACPI_DATA_TYPE DataType; - UINT8 *Buffer; - UINTN BufferSize; - UINTN DataSize; + EFI_STATUS Status; + EFI_ACPI_HANDLE ObjectHandle; + EFI_ACPI_HANDLE DataHandle; + EFI_ACPI_DATA_TYPE DataType; + UINT8 *Buffer; + UINTN BufferSize; + UINTN DataSize; =20 - if (AcpiSdtProtocol =3D=3D NULL || AsciiObjectPath =3D=3D NULL) { + if ((AcpiSdtProtocol =3D=3D NULL) || (AsciiObjectPath =3D=3D NULL)) { return EFI_INVALID_PARAMETER; } =20 ObjectHandle =3D NULL; - DataHandle =3D NULL; + DataHandle =3D NULL; =20 Status =3D AcpiSdtProtocol->FindPath (TableHandle, AsciiObjectPath, &O= bjectHandle); if (EFI_ERROR (Status)) { @@ -332,6 +333,7 @@ AcpiAmlObjectUpdateInteger ( Status =3D EFI_NOT_FOUND; goto Exit; } + ASSERT (DataType =3D=3D EFI_ACPI_DATA_TYPE_OPCODE); ASSERT (Buffer !=3D NULL); =20 @@ -350,7 +352,7 @@ AcpiAmlObjectUpdateInteger ( ASSERT (DataType =3D=3D EFI_ACPI_DATA_TYPE_OPCODE); ASSERT (Buffer !=3D NULL); =20 - if (Buffer[0] =3D=3D AML_ZERO_OP || Buffer[0] =3D=3D AML_ONE_OP) { + if ((Buffer[0] =3D=3D AML_ZERO_OP) || (Buffer[0] =3D=3D AML_ONE_OP)) { Status =3D AcpiSdtProtocol->SetOption (DataHandle, 0, (VOID *)&Value= , sizeof (UINT8)); ASSERT_EFI_ERROR (Status); } else { @@ -358,26 +360,26 @@ AcpiAmlObjectUpdateInteger ( // Check the size of data object // switch (Buffer[0]) { - case AML_BYTE_PREFIX: - DataSize =3D sizeof (UINT8); - break; + case AML_BYTE_PREFIX: + DataSize =3D sizeof (UINT8); + break; =20 - case AML_WORD_PREFIX: - DataSize =3D sizeof (UINT16); - break; + case AML_WORD_PREFIX: + DataSize =3D sizeof (UINT16); + break; =20 - case AML_DWORD_PREFIX: - DataSize =3D sizeof (UINT32); - break; + case AML_DWORD_PREFIX: + DataSize =3D sizeof (UINT32); + break; =20 - case AML_QWORD_PREFIX: - DataSize =3D sizeof (UINT64); - break; + case AML_QWORD_PREFIX: + DataSize =3D sizeof (UINT64); + break; =20 - default: - // The data type of the ACPI object is not an integer - Status =3D EFI_INVALID_PARAMETER; - goto Exit; + default: + // The data type of the ACPI object is not an integer + Status =3D EFI_INVALID_PARAMETER; + goto Exit; } =20 Status =3D AcpiSdtProtocol->SetOption (DataHandle, 1, (VOID *)&Value= , DataSize); diff --git a/EmbeddedPkg/Include/Library/AcpiLib.h b/EmbeddedPkg/Include/= Library/AcpiLib.h index 9dbacd85b0ef..29137a4a53df 100644 --- a/EmbeddedPkg/Include/Library/AcpiLib.h +++ b/EmbeddedPkg/Include/Library/AcpiLib.h @@ -144,8 +144,8 @@ LocateAndInstallAcpiFromFv ( EFI_STATUS EFIAPI AcpiUpdateChecksum ( - IN OUT UINT8 *Buffer, - IN UINTN Size + IN OUT UINT8 *Buffer, + IN UINTN Size ); =20 /** @@ -168,11 +168,11 @@ AcpiUpdateChecksum ( EFI_STATUS EFIAPI AcpiLocateTableBySignature ( - IN EFI_ACPI_SDT_PROTOCOL *AcpiSdtProtocol, - IN UINT32 TableSignature, - IN OUT UINTN *Index, - OUT EFI_ACPI_DESCRIPTION_HEADER **Table, - OUT UINTN *TableKey + IN EFI_ACPI_SDT_PROTOCOL *AcpiSdtProtocol, + IN UINT32 TableSignature, + IN OUT UINTN *Index, + OUT EFI_ACPI_DESCRIPTION_HEADER **Table, + OUT UINTN *TableKey ); =20 /** @@ -193,10 +193,10 @@ AcpiLocateTableBySignature ( EFI_STATUS EFIAPI AcpiAmlObjectUpdateInteger ( - IN EFI_ACPI_SDT_PROTOCOL *AcpiSdtProtocol, - IN EFI_ACPI_HANDLE TableHandle, - IN CHAR8 *AsciiObjectPath, - IN UINTN Value + IN EFI_ACPI_SDT_PROTOCOL *AcpiSdtProtocol, + IN EFI_ACPI_HANDLE TableHandle, + IN CHAR8 *AsciiObjectPath, + IN UINTN Value ); =20 #endif // __ACPI_LIB_H__ --=20 2.28.0.windows.1