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

@@ -22,7 +22,7 @@
#include "DynamicTableFactory.h"
extern EDKII_DYNAMIC_TABLE_FACTORY_INFO TableFactoryInfo;
extern EDKII_DYNAMIC_TABLE_FACTORY_INFO TableFactoryInfo;
/** Return a pointer to the ACPI table generator.
@@ -40,13 +40,13 @@ extern EDKII_DYNAMIC_TABLE_FACTORY_INFO TableFactoryInfo;
EFI_STATUS
EFIAPI
GetAcpiTableGenerator (
IN CONST EDKII_DYNAMIC_TABLE_FACTORY_PROTOCOL * CONST This,
IN CONST EDKII_DYNAMIC_TABLE_FACTORY_PROTOCOL *CONST This,
IN CONST ACPI_TABLE_GENERATOR_ID GeneratorId,
OUT CONST ACPI_TABLE_GENERATOR ** CONST Generator
OUT CONST ACPI_TABLE_GENERATOR **CONST Generator
)
{
UINT16 TableId;
EDKII_DYNAMIC_TABLE_FACTORY_INFO * FactoryInfo;
UINT16 TableId;
EDKII_DYNAMIC_TABLE_FACTORY_INFO *FactoryInfo;
ASSERT (This != NULL);
@@ -63,12 +63,13 @@ GetAcpiTableGenerator (
}
*Generator = NULL;
TableId = GET_TABLE_ID (GeneratorId);
TableId = GET_TABLE_ID (GeneratorId);
if (IS_GENERATOR_NAMESPACE_STD (GeneratorId)) {
if (TableId >= EStdAcpiTableIdMax) {
ASSERT (TableId < EStdAcpiTableIdMax);
return EFI_INVALID_PARAMETER;
}
if (FactoryInfo->StdAcpiTableGeneratorList[TableId] != NULL) {
*Generator = FactoryInfo->StdAcpiTableGeneratorList[TableId];
} else {
@@ -79,12 +80,14 @@ GetAcpiTableGenerator (
ASSERT (TableId <= FixedPcdGet16 (PcdMaxCustomACPIGenerators));
return EFI_INVALID_PARAMETER;
}
if (FactoryInfo->CustomAcpiTableGeneratorList[TableId] != NULL) {
*Generator = FactoryInfo->CustomAcpiTableGeneratorList[TableId];
} else {
return EFI_NOT_FOUND;
}
}
return EFI_SUCCESS;
}
@@ -105,7 +108,7 @@ GetAcpiTableGenerator (
EFI_STATUS
EFIAPI
RegisterAcpiTableGenerator (
IN CONST ACPI_TABLE_GENERATOR * CONST Generator
IN CONST ACPI_TABLE_GENERATOR *CONST Generator
)
{
UINT16 TableId;
@@ -132,6 +135,7 @@ RegisterAcpiTableGenerator (
ASSERT (TableId < EStdAcpiTableIdMax);
return EFI_INVALID_PARAMETER;
}
if (TableFactoryInfo.StdAcpiTableGeneratorList[TableId] == NULL) {
TableFactoryInfo.StdAcpiTableGeneratorList[TableId] = Generator;
} else {
@@ -142,12 +146,14 @@ RegisterAcpiTableGenerator (
ASSERT (TableId <= FixedPcdGet16 (PcdMaxCustomACPIGenerators));
return EFI_INVALID_PARAMETER;
}
if (TableFactoryInfo.CustomAcpiTableGeneratorList[TableId] == NULL) {
TableFactoryInfo.CustomAcpiTableGeneratorList[TableId] = Generator;
} else {
return EFI_ALREADY_STARTED;
}
}
return EFI_SUCCESS;
}
@@ -166,7 +172,7 @@ RegisterAcpiTableGenerator (
EFI_STATUS
EFIAPI
DeregisterAcpiTableGenerator (
IN CONST ACPI_TABLE_GENERATOR * CONST Generator
IN CONST ACPI_TABLE_GENERATOR *CONST Generator
)
{
UINT16 TableId;
@@ -191,10 +197,12 @@ DeregisterAcpiTableGenerator (
ASSERT (TableId < EStdAcpiTableIdMax);
return EFI_INVALID_PARAMETER;
}
if (TableFactoryInfo.StdAcpiTableGeneratorList[TableId] != NULL) {
if (Generator != TableFactoryInfo.StdAcpiTableGeneratorList[TableId]) {
return EFI_INVALID_PARAMETER;
}
TableFactoryInfo.StdAcpiTableGeneratorList[TableId] = NULL;
} else {
return EFI_NOT_FOUND;
@@ -204,11 +212,14 @@ DeregisterAcpiTableGenerator (
ASSERT (TableId <= FixedPcdGet16 (PcdMaxCustomACPIGenerators));
return EFI_INVALID_PARAMETER;
}
if (TableFactoryInfo.CustomAcpiTableGeneratorList[TableId] != NULL) {
if (Generator !=
TableFactoryInfo.CustomAcpiTableGeneratorList[TableId]) {
TableFactoryInfo.CustomAcpiTableGeneratorList[TableId])
{
return EFI_INVALID_PARAMETER;
}
TableFactoryInfo.CustomAcpiTableGeneratorList[TableId] = NULL;
} else {
return EFI_NOT_FOUND;

View File

@@ -21,7 +21,7 @@
#include "DynamicTableFactory.h"
extern EDKII_DYNAMIC_TABLE_FACTORY_INFO TableFactoryInfo;
extern EDKII_DYNAMIC_TABLE_FACTORY_INFO TableFactoryInfo;
/** Return a pointer to the DT table generator.
@@ -39,13 +39,13 @@ extern EDKII_DYNAMIC_TABLE_FACTORY_INFO TableFactoryInfo;
EFI_STATUS
EFIAPI
GetDtTableGenerator (
IN CONST EDKII_DYNAMIC_TABLE_FACTORY_PROTOCOL * CONST This,
IN CONST EDKII_DYNAMIC_TABLE_FACTORY_PROTOCOL *CONST This,
IN CONST DT_TABLE_GENERATOR_ID GeneratorId,
OUT CONST DT_TABLE_GENERATOR ** CONST Generator
OUT CONST DT_TABLE_GENERATOR **CONST Generator
)
{
UINT16 TableId;
EDKII_DYNAMIC_TABLE_FACTORY_INFO * FactoryInfo;
UINT16 TableId;
EDKII_DYNAMIC_TABLE_FACTORY_INFO *FactoryInfo;
ASSERT (This != NULL);
@@ -62,12 +62,13 @@ GetDtTableGenerator (
}
*Generator = NULL;
TableId = GET_TABLE_ID (GeneratorId);
TableId = GET_TABLE_ID (GeneratorId);
if (IS_GENERATOR_NAMESPACE_STD (GeneratorId)) {
if (TableId >= EStdDtTableIdMax) {
ASSERT (TableId < EStdDtTableIdMax);
return EFI_INVALID_PARAMETER;
}
if (FactoryInfo->StdDtTableGeneratorList[TableId] != NULL) {
*Generator = FactoryInfo->StdDtTableGeneratorList[TableId];
} else {
@@ -78,12 +79,14 @@ GetDtTableGenerator (
ASSERT (TableId <= FixedPcdGet16 (PcdMaxCustomDTGenerators));
return EFI_INVALID_PARAMETER;
}
if (FactoryInfo->CustomDtTableGeneratorList[TableId] != NULL) {
*Generator = FactoryInfo->CustomDtTableGeneratorList[TableId];
} else {
return EFI_NOT_FOUND;
}
}
return EFI_SUCCESS;
}
@@ -104,7 +107,7 @@ GetDtTableGenerator (
EFI_STATUS
EFIAPI
RegisterDtTableGenerator (
IN CONST DT_TABLE_GENERATOR * CONST Generator
IN CONST DT_TABLE_GENERATOR *CONST Generator
)
{
UINT16 TableId;
@@ -131,6 +134,7 @@ RegisterDtTableGenerator (
ASSERT (TableId < EStdDtTableIdMax);
return EFI_INVALID_PARAMETER;
}
if (TableFactoryInfo.StdDtTableGeneratorList[TableId] == NULL) {
TableFactoryInfo.StdDtTableGeneratorList[TableId] = Generator;
} else {
@@ -141,12 +145,14 @@ RegisterDtTableGenerator (
ASSERT (TableId <= FixedPcdGet16 (PcdMaxCustomDTGenerators));
return EFI_INVALID_PARAMETER;
}
if (TableFactoryInfo.CustomDtTableGeneratorList[TableId] == NULL) {
TableFactoryInfo.CustomDtTableGeneratorList[TableId] = Generator;
} else {
return EFI_ALREADY_STARTED;
}
}
return EFI_SUCCESS;
}
@@ -165,7 +171,7 @@ RegisterDtTableGenerator (
EFI_STATUS
EFIAPI
DeregisterDtTableGenerator (
IN CONST DT_TABLE_GENERATOR * CONST Generator
IN CONST DT_TABLE_GENERATOR *CONST Generator
)
{
UINT16 TableId;
@@ -190,10 +196,12 @@ DeregisterDtTableGenerator (
ASSERT (TableId < EStdDtTableIdMax);
return EFI_INVALID_PARAMETER;
}
if (TableFactoryInfo.StdDtTableGeneratorList[TableId] != NULL) {
if (Generator != TableFactoryInfo.StdDtTableGeneratorList[TableId]) {
return EFI_INVALID_PARAMETER;
}
TableFactoryInfo.StdDtTableGeneratorList[TableId] = NULL;
} else {
return EFI_NOT_FOUND;
@@ -203,11 +211,14 @@ DeregisterDtTableGenerator (
ASSERT (TableId <= FixedPcdGet16 (PcdMaxCustomDTGenerators));
return EFI_INVALID_PARAMETER;
}
if (TableFactoryInfo.CustomDtTableGeneratorList[TableId] != NULL) {
if (Generator !=
TableFactoryInfo.CustomDtTableGeneratorList[TableId]) {
TableFactoryInfo.CustomDtTableGeneratorList[TableId])
{
return EFI_INVALID_PARAMETER;
}
TableFactoryInfo.CustomDtTableGeneratorList[TableId] = NULL;
} else {
return EFI_NOT_FOUND;

View File

@@ -22,33 +22,33 @@
typedef struct DynamicTableFactoryInfo {
/// An array for holding the list of Standard ACPI Table Generators.
CONST ACPI_TABLE_GENERATOR *
StdAcpiTableGeneratorList[EStdAcpiTableIdMax];
StdAcpiTableGeneratorList[EStdAcpiTableIdMax];
/// An array for holding the list of Custom ACPI Table Generators.
CONST ACPI_TABLE_GENERATOR *
CustomAcpiTableGeneratorList[FixedPcdGet16 (
PcdMaxCustomACPIGenerators
)];
CustomAcpiTableGeneratorList[FixedPcdGet16 (
PcdMaxCustomACPIGenerators
)];
/// An array for holding the list of Standard SMBIOS Table Generators.
CONST SMBIOS_TABLE_GENERATOR *
StdSmbiosTableGeneratorList[EStdSmbiosTableIdMax];
StdSmbiosTableGeneratorList[EStdSmbiosTableIdMax];
/// An array for holding the list of Custom SMBIOS Table Generators.
CONST SMBIOS_TABLE_GENERATOR *
CustomSmbiosTableGeneratorList[FixedPcdGet16 (
PcdMaxCustomSMBIOSGenerators
)];
CustomSmbiosTableGeneratorList[FixedPcdGet16 (
PcdMaxCustomSMBIOSGenerators
)];
/// An array for holding the list of Standard DT Table Generators.
CONST DT_TABLE_GENERATOR *
StdDtTableGeneratorList[EStdDtTableIdMax];
StdDtTableGeneratorList[EStdDtTableIdMax];
/// An array for holding the list of Custom DT Table Generators.
CONST DT_TABLE_GENERATOR *
CustomDtTableGeneratorList[FixedPcdGet16 (
PcdMaxCustomDTGenerators
)];
CustomDtTableGeneratorList[FixedPcdGet16 (
PcdMaxCustomDTGenerators
)];
} EDKII_DYNAMIC_TABLE_FACTORY_INFO;
/** Return a pointer to the ACPI table generator.
@@ -67,9 +67,9 @@ typedef struct DynamicTableFactoryInfo {
EFI_STATUS
EFIAPI
GetAcpiTableGenerator (
IN CONST EDKII_DYNAMIC_TABLE_FACTORY_PROTOCOL * CONST This,
IN CONST EDKII_DYNAMIC_TABLE_FACTORY_PROTOCOL *CONST This,
IN CONST ACPI_TABLE_GENERATOR_ID GeneratorId,
OUT CONST ACPI_TABLE_GENERATOR ** CONST Generator
OUT CONST ACPI_TABLE_GENERATOR **CONST Generator
);
/** Return a pointer to the SMBIOS table generator.
@@ -88,9 +88,9 @@ GetAcpiTableGenerator (
EFI_STATUS
EFIAPI
GetSmbiosTableGenerator (
IN CONST EDKII_DYNAMIC_TABLE_FACTORY_PROTOCOL * CONST This,
IN CONST EDKII_DYNAMIC_TABLE_FACTORY_PROTOCOL *CONST This,
IN CONST SMBIOS_TABLE_GENERATOR_ID GeneratorId,
OUT CONST SMBIOS_TABLE_GENERATOR ** CONST Generator
OUT CONST SMBIOS_TABLE_GENERATOR **CONST Generator
);
/** Return a pointer to the DT table generator.
@@ -109,9 +109,9 @@ GetSmbiosTableGenerator (
EFI_STATUS
EFIAPI
GetDtTableGenerator (
IN CONST EDKII_DYNAMIC_TABLE_FACTORY_PROTOCOL * CONST This,
IN CONST EDKII_DYNAMIC_TABLE_FACTORY_PROTOCOL *CONST This,
IN CONST DT_TABLE_GENERATOR_ID GeneratorId,
OUT CONST DT_TABLE_GENERATOR ** CONST Generator
OUT CONST DT_TABLE_GENERATOR **CONST Generator
);
#pragma pack()

View File

@@ -27,14 +27,14 @@
/** The Dynamic Table Factory protocol structure that holds the
list of registered ACPI and SMBIOS table generators.
*/
EDKII_DYNAMIC_TABLE_FACTORY_INFO TableFactoryInfo;
EDKII_DYNAMIC_TABLE_FACTORY_INFO TableFactoryInfo;
/** A structure describing the Dynamic Table Factory protocol.
*/
STATIC
CONST
EDKII_DYNAMIC_TABLE_FACTORY_PROTOCOL DynamicTableFactoryProtocol = {
CREATE_REVISION (1, 0),
EDKII_DYNAMIC_TABLE_FACTORY_PROTOCOL DynamicTableFactoryProtocol = {
CREATE_REVISION (1, 0),
GetAcpiTableGenerator,
RegisterAcpiTableGenerator,
DeregisterAcpiTableGenerator,
@@ -60,8 +60,8 @@ EDKII_DYNAMIC_TABLE_FACTORY_PROTOCOL DynamicTableFactoryProtocol = {
EFI_STATUS
EFIAPI
DynamicTableFactoryDxeInitialize (
IN EFI_HANDLE ImageHandle,
IN EFI_SYSTEM_TABLE * SystemTable
IN EFI_HANDLE ImageHandle,
IN EFI_SYSTEM_TABLE *SystemTable
)
{
EFI_STATUS Status;
@@ -70,7 +70,7 @@ DynamicTableFactoryDxeInitialize (
&ImageHandle,
&gEdkiiDynamicTableFactoryProtocolGuid,
EFI_NATIVE_INTERFACE,
(VOID*)&DynamicTableFactoryProtocol
(VOID *)&DynamicTableFactoryProtocol
);
if (EFI_ERROR (Status)) {
DEBUG ((
@@ -80,5 +80,6 @@ DynamicTableFactoryDxeInitialize (
Status
));
}
return Status;
}

View File

@@ -22,7 +22,7 @@
#include "DynamicTableFactory.h"
extern EDKII_DYNAMIC_TABLE_FACTORY_INFO TableFactoryInfo;
extern EDKII_DYNAMIC_TABLE_FACTORY_INFO TableFactoryInfo;
/** Return a pointer to the SMBIOS table generator.
@@ -40,13 +40,13 @@ extern EDKII_DYNAMIC_TABLE_FACTORY_INFO TableFactoryInfo;
EFI_STATUS
EFIAPI
GetSmbiosTableGenerator (
IN CONST EDKII_DYNAMIC_TABLE_FACTORY_PROTOCOL * CONST This,
IN CONST EDKII_DYNAMIC_TABLE_FACTORY_PROTOCOL *CONST This,
IN CONST SMBIOS_TABLE_GENERATOR_ID GeneratorId,
OUT CONST SMBIOS_TABLE_GENERATOR ** CONST Generator
OUT CONST SMBIOS_TABLE_GENERATOR **CONST Generator
)
{
UINT16 TableId;
EDKII_DYNAMIC_TABLE_FACTORY_INFO * FactoryInfo;
UINT16 TableId;
EDKII_DYNAMIC_TABLE_FACTORY_INFO *FactoryInfo;
ASSERT (This != NULL);
@@ -63,12 +63,13 @@ GetSmbiosTableGenerator (
}
*Generator = NULL;
TableId = GET_TABLE_ID (GeneratorId);
TableId = GET_TABLE_ID (GeneratorId);
if (IS_GENERATOR_NAMESPACE_STD (GeneratorId)) {
if (TableId >= EStdSmbiosTableIdMax) {
ASSERT (TableId < EStdSmbiosTableIdMax);
return EFI_INVALID_PARAMETER;
}
if (FactoryInfo->StdSmbiosTableGeneratorList[TableId] != NULL) {
*Generator = FactoryInfo->StdSmbiosTableGeneratorList[TableId];
} else {
@@ -79,12 +80,14 @@ GetSmbiosTableGenerator (
ASSERT (TableId <= FixedPcdGet16 (PcdMaxCustomSMBIOSGenerators));
return EFI_INVALID_PARAMETER;
}
if (FactoryInfo->CustomSmbiosTableGeneratorList[TableId] != NULL) {
*Generator = FactoryInfo->CustomSmbiosTableGeneratorList[TableId];
} else {
return EFI_NOT_FOUND;
}
}
return EFI_SUCCESS;
}
@@ -105,7 +108,7 @@ GetSmbiosTableGenerator (
EFI_STATUS
EFIAPI
RegisterSmbiosTableGenerator (
IN CONST SMBIOS_TABLE_GENERATOR * CONST Generator
IN CONST SMBIOS_TABLE_GENERATOR *CONST Generator
)
{
UINT16 TableId;
@@ -132,6 +135,7 @@ RegisterSmbiosTableGenerator (
ASSERT (TableId < EStdSmbiosTableIdMax);
return EFI_INVALID_PARAMETER;
}
if (TableFactoryInfo.StdSmbiosTableGeneratorList[TableId] == NULL) {
TableFactoryInfo.StdSmbiosTableGeneratorList[TableId] = Generator;
} else {
@@ -142,12 +146,14 @@ RegisterSmbiosTableGenerator (
ASSERT (TableId <= FixedPcdGet16 (PcdMaxCustomSMBIOSGenerators));
return EFI_INVALID_PARAMETER;
}
if (TableFactoryInfo.CustomSmbiosTableGeneratorList[TableId] == NULL) {
TableFactoryInfo.CustomSmbiosTableGeneratorList[TableId] = Generator;
} else {
return EFI_ALREADY_STARTED;
}
}
return EFI_SUCCESS;
}
@@ -166,7 +172,7 @@ RegisterSmbiosTableGenerator (
EFI_STATUS
EFIAPI
DeregisterSmbiosTableGenerator (
IN CONST SMBIOS_TABLE_GENERATOR * CONST Generator
IN CONST SMBIOS_TABLE_GENERATOR *CONST Generator
)
{
UINT16 TableId;
@@ -191,10 +197,12 @@ DeregisterSmbiosTableGenerator (
ASSERT (TableId < EStdSmbiosTableIdMax);
return EFI_INVALID_PARAMETER;
}
if (TableFactoryInfo.StdSmbiosTableGeneratorList[TableId] != NULL) {
if (Generator != TableFactoryInfo.StdSmbiosTableGeneratorList[TableId]) {
return EFI_INVALID_PARAMETER;
}
TableFactoryInfo.StdSmbiosTableGeneratorList[TableId] = NULL;
} else {
return EFI_NOT_FOUND;
@@ -204,11 +212,14 @@ DeregisterSmbiosTableGenerator (
ASSERT (TableId <= FixedPcdGet16 (PcdMaxCustomSMBIOSGenerators));
return EFI_INVALID_PARAMETER;
}
if (TableFactoryInfo.CustomSmbiosTableGeneratorList[TableId] != NULL) {
if (Generator !=
TableFactoryInfo.CustomSmbiosTableGeneratorList[TableId]) {
TableFactoryInfo.CustomSmbiosTableGeneratorList[TableId])
{
return EFI_INVALID_PARAMETER;
}
TableFactoryInfo.CustomSmbiosTableGeneratorList[TableId] = NULL;
} else {
return EFI_NOT_FOUND;