From: "Michael Kubacki" <mikuback@linux.microsoft.com>
To: devel@edk2.groups.io
Cc: Leif Lindholm <quic_llindhol@quicinc.com>,
Ard Biesheuvel <ardb+tianocore@kernel.org>,
Abner Chang <abner.chang@amd.com>,
Daniel Schaefer <git@danielschaefer.me>
Subject: [PATCH v1 1/3] EmbeddedPkg/AcpiLib: Fix code formatting errors
Date: Tue, 6 Sep 2022 22:36:47 -0400 [thread overview]
Message-ID: <20220907023649.312-2-mikuback@linux.microsoft.com> (raw)
In-Reply-To: <20220907023649.312-1-mikuback@linux.microsoft.com>
From: Michael Kubacki <michael.kubacki@microsoft.com>
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=4046
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 <quic_llindhol@quicinc.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Abner Chang <abner.chang@amd.com>
Cc: Daniel Schaefer <git@danielschaefer.me>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
---
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;
- if (Buffer == NULL || Size == 0) {
+ if ((Buffer == NULL) || (Size == 0)) {
return EFI_INVALID_PARAMETER;
}
@@ -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;
- if (AcpiSdtProtocol == NULL
- || Table == NULL
- || TableKey == NULL) {
+ if ( (AcpiSdtProtocol == NULL)
+ || (Table == NULL)
+ || (TableKey == NULL))
+ {
return EFI_INVALID_PARAMETER;
}
@@ -261,7 +262,7 @@ AcpiLocateTableBySignature (
// Search for ACPI Table with matching signature
//
TableVersion = 0;
- TableIndex = *Index;
+ TableIndex = *Index;
while (!EFI_ERROR (Status)) {
Status = 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;
- if (AcpiSdtProtocol == NULL || AsciiObjectPath == NULL) {
+ if ((AcpiSdtProtocol == NULL) || (AsciiObjectPath == NULL)) {
return EFI_INVALID_PARAMETER;
}
ObjectHandle = NULL;
- DataHandle = NULL;
+ DataHandle = NULL;
Status = AcpiSdtProtocol->FindPath (TableHandle, AsciiObjectPath, &ObjectHandle);
if (EFI_ERROR (Status)) {
@@ -332,6 +333,7 @@ AcpiAmlObjectUpdateInteger (
Status = EFI_NOT_FOUND;
goto Exit;
}
+
ASSERT (DataType == EFI_ACPI_DATA_TYPE_OPCODE);
ASSERT (Buffer != NULL);
@@ -350,7 +352,7 @@ AcpiAmlObjectUpdateInteger (
ASSERT (DataType == EFI_ACPI_DATA_TYPE_OPCODE);
ASSERT (Buffer != NULL);
- if (Buffer[0] == AML_ZERO_OP || Buffer[0] == AML_ONE_OP) {
+ if ((Buffer[0] == AML_ZERO_OP) || (Buffer[0] == AML_ONE_OP)) {
Status = 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 = sizeof (UINT8);
- break;
+ case AML_BYTE_PREFIX:
+ DataSize = sizeof (UINT8);
+ break;
- case AML_WORD_PREFIX:
- DataSize = sizeof (UINT16);
- break;
+ case AML_WORD_PREFIX:
+ DataSize = sizeof (UINT16);
+ break;
- case AML_DWORD_PREFIX:
- DataSize = sizeof (UINT32);
- break;
+ case AML_DWORD_PREFIX:
+ DataSize = sizeof (UINT32);
+ break;
- case AML_QWORD_PREFIX:
- DataSize = sizeof (UINT64);
- break;
+ case AML_QWORD_PREFIX:
+ DataSize = sizeof (UINT64);
+ break;
- default:
- // The data type of the ACPI object is not an integer
- Status = EFI_INVALID_PARAMETER;
- goto Exit;
+ default:
+ // The data type of the ACPI object is not an integer
+ Status = EFI_INVALID_PARAMETER;
+ goto Exit;
}
Status = 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
);
/**
@@ -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
);
/**
@@ -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
);
#endif // __ACPI_LIB_H__
--
2.28.0.windows.1
next prev parent reply other threads:[~2022-09-07 2:37 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-07 2:36 [PATCH v1 0/3] EmbeddedPkg: Enable CI Michael Kubacki
2022-09-07 2:36 ` Michael Kubacki [this message]
2022-09-07 2:36 ` [PATCH v1 2/3] EmbeddedPkg: Add CI YAML file Michael Kubacki
2022-09-07 2:36 ` [PATCH v1 3/3] EmbeddedPkg: Only run in CI for GCC5 Michael Kubacki
[not found] ` <1712738C00A60617.17907@groups.io>
2022-09-07 3:27 ` [edk2-devel] " Michael Kubacki
2022-09-09 1:37 ` Michael D Kinney
2022-09-07 7:37 ` [PATCH v1 0/3] EmbeddedPkg: Enable CI Ard Biesheuvel
2022-09-07 15:00 ` [edk2-devel] " Michael Kubacki
2022-09-07 15:16 ` Ard Biesheuvel
2022-09-15 19:46 ` Michael Kubacki
2022-09-15 20:47 ` Ard Biesheuvel
2022-09-15 20:51 ` Michael D Kinney
2022-09-15 21:02 ` Ard Biesheuvel
2022-09-15 21:54 ` Michael D Kinney
2022-09-23 1:09 ` Michael Kubacki
2022-09-23 11:47 ` Ard Biesheuvel
2022-09-23 15:30 ` Michael D Kinney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220907023649.312-2-mikuback@linux.microsoft.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox