[PATCH v1 13/13] MdePkg: Fix broken coding style in Acpi64.h


Chris Jones
 

Fix several coding style issues raised by EccCheck. These issues are
also present in previous versions of Acpi.h however seem to have been
introduced prior to the CI check.

- Error code: 7008 - complex types should be typedef-ed, Nested union
in [EFI_ACPI_6_4_GENERIC_INITIATOR_AFFINITY_STRUCTURE].
- Error code: 8005 - Variable name must contain lower case characters,
Member variable [EFI_ACPI_6_4_GIC_STRUCTURE_.GICV].
- Error code: 8005 - Variable name must contain lower case characters,
Member variable [EFI_ACPI_6_4_GIC_STRUCTURE_.GICH].
- Error code: 8005 - Variable name must contain lower case characters,
Member variable [EFI_ACPI_6_4_GIC_STRUCTURE_.MPIDR].

Signed-off-by: Chris Jones <christopher.jones@arm.com>
---
MdePkg/Include/IndustryStandard/Acpi64.h | 39 +++++++++++---------
1 file changed, 21 insertions(+), 18 deletions(-)

diff --git a/MdePkg/Include/IndustryStandard/Acpi64.h b/MdePkg/Include/IndustryStandard/Acpi64.h
index c905db93fabb6faa553dd49a9fed886437dd4daf..abff78ea5d92afa4693689732d6cd147c16ad11c 100644
--- a/MdePkg/Include/IndustryStandard/Acpi64.h
+++ b/MdePkg/Include/IndustryStandard/Acpi64.h
@@ -502,18 +502,18 @@ typedef struct {
UINT8 Type;
UINT8 Length;
UINT16 Reserved;
- UINT32 CPUInterfaceNumber;
+ UINT32 CpuInterfaceNumber;
UINT32 AcpiProcessorUid;
UINT32 Flags;
UINT32 ParkingProtocolVersion;
UINT32 PerformanceInterruptGsiv;
UINT64 ParkedAddress;
UINT64 PhysicalBaseAddress;
- UINT64 GICV;
- UINT64 GICH;
- UINT32 VGICMaintenanceInterrupt;
- UINT64 GICRBaseAddress;
- UINT64 MPIDR;
+ UINT64 GicV;
+ UINT64 GicH;
+ UINT32 VGicMaintenanceInterrupt;
+ UINT64 GicRBaseAddress;
+ UINT64 MpIdr;
UINT8 ProcessorPowerEfficiencyClass;
UINT8 Reserved2;
UINT16 SpeOverflowInterrupt;
@@ -788,22 +788,25 @@ typedef struct {
} EFI_ACPI_6_4_DEVICE_HANDLE_PCI;

///
-/// Generic Initiator Affinity Structure
+/// Device Handle
///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 Reserved1;
- UINT8 DeviceHandleType;
- UINT32 ProximityDomain;
-
- union {
+typedef union {
EFI_ACPI_6_4_DEVICE_HANDLE_ACPI Acpi;
EFI_ACPI_6_4_DEVICE_HANDLE_PCI Pci;
- } DeviceHandle;
+} EFI_ACPI_6_4_DEVICE_HANDLE;

- UINT32 Flags;
- UINT8 Reserved2[4];
+///
+/// Generic Initiator Affinity Structure
+///
+typedef struct {
+ UINT8 Type;
+ UINT8 Length;
+ UINT8 Reserved1;
+ UINT8 DeviceHandleType;
+ UINT32 ProximityDomain;
+ EFI_ACPI_6_4_DEVICE_HANDLE DeviceHandle;
+ UINT32 Flags;
+ UINT8 Reserved2[4];
} EFI_ACPI_6_4_GENERIC_INITIATOR_AFFINITY_STRUCTURE;

///
--
Guid("CE165669-3EF3-493F-B85D-6190EE5B9759")

Join devel@edk2.groups.io to automatically receive all group messages.