public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Sami Mujawar <sami.mujawar@arm.com>
To: edk2-devel@lists.01.org
Cc: leif.lindholm@linaro.org, evan.lloyd@arm.com,
	Matteo.Carlini@arm.com, Stephanie.Hughes-Fitt@arm.com,
	nd@arm.com
Subject: [staging/dynamictables PATCH v1 5/5] DynamicTablesPkg: Fix variable declaration
Date: Wed, 27 Jun 2018 17:47:46 +0100	[thread overview]
Message-ID: <20180627164746.36188-6-sami.mujawar@arm.com> (raw)
In-Reply-To: <20180627164746.36188-1-sami.mujawar@arm.com>

Fixed the 'There should be no initialization of a variable
as part of its declaration Variable Name' errors reported
by the ecc tool.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
---

Notes:
    v1:
    - Fix ecc tool reported issues                                  [SAMI]

 DynamicTablesPkg/Drivers/DynamicTableManagerDxe/DynamicTableManagerDxe.c |  27 +++--
 DynamicTablesPkg/Library/Acpi/Arm/AcpiDbg2LibArm/Dbg2Generator.c         |   6 +-
 DynamicTablesPkg/Library/Acpi/Arm/AcpiFadtLibArm/FadtGenerator.c         |   6 +-
 DynamicTablesPkg/Library/Acpi/Arm/AcpiGtdtLibArm/GtdtGenerator.c         |  12 +-
 DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c         | 125 ++++++++++----------
 DynamicTablesPkg/Library/Acpi/Arm/AcpiMadtLibArm/MadtGenerator.c         |   6 +-
 DynamicTablesPkg/Library/Acpi/Arm/AcpiMcfgLibArm/McfgGenerator.c         |   6 +-
 DynamicTablesPkg/Library/Acpi/Arm/AcpiRawLibArm/RawGenerator.c           |   6 +-
 DynamicTablesPkg/Library/Acpi/Arm/AcpiSpcrLibArm/SpcrGenerator.c         |   6 +-
 9 files changed, 113 insertions(+), 87 deletions(-)

diff --git a/DynamicTablesPkg/Drivers/DynamicTableManagerDxe/DynamicTableManagerDxe.c b/DynamicTablesPkg/Drivers/DynamicTableManagerDxe/DynamicTableManagerDxe.c
index bb1744c4ea0eaf05d0d5f356cefdab0fe6faf488..2eddd8a5af38b184af544b85f7bca3674667d66c 100644
--- a/DynamicTablesPkg/Drivers/DynamicTableManagerDxe/DynamicTableManagerDxe.c
+++ b/DynamicTablesPkg/Drivers/DynamicTableManagerDxe/DynamicTableManagerDxe.c
@@ -69,8 +69,8 @@ BuildAndInstallAcpiTable (
 {
   EFI_STATUS                    Status;
   EFI_STATUS                    Status1;
-  CONST ACPI_TABLE_GENERATOR  * Generator = NULL;
-  EFI_ACPI_DESCRIPTION_HEADER * AcpiTable = NULL;
+  CONST ACPI_TABLE_GENERATOR  * Generator;
+  EFI_ACPI_DESCRIPTION_HEADER * AcpiTable;
   UINTN                         TableHandle;
 
   ASSERT (TableFactoryProtocol != NULL);
@@ -86,6 +86,7 @@ BuildAndInstallAcpiTable (
     AcpiTableInfo->TableGeneratorId
     ));
 
+  Generator = NULL;
   Status = TableFactoryProtocol->GetAcpiTableGenerator (
                                    TableFactoryProtocol,
                                    AcpiTableInfo->TableGeneratorId,
@@ -123,6 +124,7 @@ BuildAndInstallAcpiTable (
     return Status;
   }
 
+  AcpiTable = NULL;
   Status = Generator->BuildAcpiTable (
                         Generator,
                         AcpiTableInfo,
@@ -214,14 +216,21 @@ VerifyMandatoryTablesArePresent (
   IN       UINT32                              AcpiTableCount
   )
 {
-  EFI_STATUS  Status = EFI_SUCCESS;
-  BOOLEAN     FadtFound = FALSE;
-  BOOLEAN     MadtFound = FALSE;
-  BOOLEAN     GtdtFound = FALSE;
-  BOOLEAN     DsdtFound = FALSE;
-  BOOLEAN     Dbg2Found = FALSE;
-  BOOLEAN     SpcrFound = FALSE;
+  EFI_STATUS  Status;
+  BOOLEAN     FadtFound;
+  BOOLEAN     MadtFound;
+  BOOLEAN     GtdtFound;
+  BOOLEAN     DsdtFound;
+  BOOLEAN     Dbg2Found;
+  BOOLEAN     SpcrFound;
 
+  Status = EFI_SUCCESS;
+  FadtFound = FALSE;
+  MadtFound = FALSE;
+  GtdtFound = FALSE;
+  DsdtFound = FALSE;
+  Dbg2Found = FALSE;
+  SpcrFound = FALSE;
   ASSERT (AcpiTableInfo != NULL);
 
   while (AcpiTableCount-- != 0) {
diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiDbg2LibArm/Dbg2Generator.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiDbg2LibArm/Dbg2Generator.c
index b8301753d518b71264683c8f863e23bb2d86c1d8..6098db32b8746b609159d3f38bb0f19a890ac3ca 100644
--- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiDbg2LibArm/Dbg2Generator.c
+++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiDbg2LibArm/Dbg2Generator.c
@@ -410,7 +410,8 @@ AcpiDbg2LibConstructor (
   IN       EFI_SYSTEM_TABLE  * CONST SystemTable
   )
 {
-  EFI_STATUS  Status = RegisterAcpiTableGenerator (&Dbg2Generator);
+  EFI_STATUS  Status;
+  Status = RegisterAcpiTableGenerator (&Dbg2Generator);
   DEBUG ((DEBUG_INFO, "DBG2: Register Generator. Status = %r\n", Status));
   ASSERT_EFI_ERROR (Status);
 
@@ -433,7 +434,8 @@ AcpiDbg2LibDestructor (
   IN       EFI_SYSTEM_TABLE  * CONST SystemTable
   )
 {
-  EFI_STATUS  Status = DeregisterAcpiTableGenerator (&Dbg2Generator);
+  EFI_STATUS  Status;
+  Status = DeregisterAcpiTableGenerator (&Dbg2Generator);
   DEBUG ((DEBUG_INFO, "DBG2: Deregister Generator. Status = %r\n", Status));
   ASSERT_EFI_ERROR (Status);
   return Status;
diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiFadtLibArm/FadtGenerator.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiFadtLibArm/FadtGenerator.c
index 7ef6e3a1d7987d20fc4fe4d8b3ea66e3303f8cc6..d2fd5096f23bedc9af6dee6b35b648a579ad1abb 100644
--- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiFadtLibArm/FadtGenerator.c
+++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiFadtLibArm/FadtGenerator.c
@@ -637,7 +637,8 @@ AcpiFadtLibConstructor (
   IN       EFI_SYSTEM_TABLE  * CONST SystemTable
   )
 {
-  EFI_STATUS  Status = RegisterAcpiTableGenerator (&FadtGenerator);
+  EFI_STATUS  Status;
+  Status = RegisterAcpiTableGenerator (&FadtGenerator);
   DEBUG ((DEBUG_INFO, "FADT: Register Generator. Status = %r\n", Status));
   ASSERT_EFI_ERROR (Status);
   return Status;
@@ -659,7 +660,8 @@ AcpiFadtLibDestructor (
   IN       EFI_SYSTEM_TABLE  * CONST SystemTable
   )
 {
-  EFI_STATUS  Status = DeregisterAcpiTableGenerator (&FadtGenerator);
+  EFI_STATUS  Status;
+  Status = DeregisterAcpiTableGenerator (&FadtGenerator);
   DEBUG ((DEBUG_INFO, "FADT: Deregister Generator. Status = %r\n", Status));
   ASSERT_EFI_ERROR (Status);
   return Status;
diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiGtdtLibArm/GtdtGenerator.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiGtdtLibArm/GtdtGenerator.c
index 2f0531f1d69f33b70280e03d02d61009244b3bea..674beff900c67406458aa05b8d901f83c8fc6fc5 100644
--- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiGtdtLibArm/GtdtGenerator.c
+++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiGtdtLibArm/GtdtGenerator.c
@@ -376,7 +376,7 @@ BuildGtdtTable (
 {
   EFI_STATUS                                      Status;
   UINT32                                          TableSize;
-  UINT32                                          PlatformTimerCount = 0;
+  UINT32                                          PlatformTimerCount;
   UINT32                                          WatchdogCount;
   UINT32                                          BlockTimerCount;
   CM_ARM_GENERIC_WATCHDOG_INFO                  * WatchdogInfoList;
@@ -384,7 +384,7 @@ BuildGtdtTable (
   EFI_ACPI_6_2_GENERIC_TIMER_DESCRIPTION_TABLE  * Gtdt;
   UINT32                                          Idx;
   UINT32                                          GTBlockOffset;
-  UINT32                                          WatchdogOffset = 0;
+  UINT32                                          WatchdogOffset;
 
   ASSERT (This != NULL);
   ASSERT (AcpiTableInfo != NULL);
@@ -434,6 +434,7 @@ BuildGtdtTable (
     ));
 
   // Calculate the GTDT Table Size
+  PlatformTimerCount = 0;
   TableSize = sizeof (EFI_ACPI_6_2_GENERIC_TIMER_DESCRIPTION_TABLE);
   if (BlockTimerCount != 0) {
     GTBlockOffset = TableSize;
@@ -465,6 +466,7 @@ BuildGtdtTable (
       ));
   }
 
+  WatchdogOffset = 0;
   if (WatchdogCount != 0) {
     WatchdogOffset = TableSize;
     PlatformTimerCount += WatchdogCount;
@@ -641,7 +643,8 @@ AcpiGtdtLibConstructor (
   IN       EFI_SYSTEM_TABLE  * CONST SystemTable
   )
 {
-  EFI_STATUS  Status = RegisterAcpiTableGenerator (&GtdtGenerator);
+  EFI_STATUS  Status;
+  Status = RegisterAcpiTableGenerator (&GtdtGenerator);
   DEBUG ((DEBUG_INFO, "GTDT: Register Generator. Status = %r\n", Status));
   ASSERT_EFI_ERROR (Status);
   return Status;
@@ -663,7 +666,8 @@ AcpiGtdtLibDestructor (
   IN       EFI_SYSTEM_TABLE  * CONST SystemTable
   )
 {
-  EFI_STATUS  Status = DeregisterAcpiTableGenerator (&GtdtGenerator);
+  EFI_STATUS  Status;
+  Status = DeregisterAcpiTableGenerator (&GtdtGenerator);
   DEBUG ((DEBUG_INFO, "GTDT: Deregister Generator. Status = %r\n", Status));
   ASSERT_EFI_ERROR (Status);
   return Status;
diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c
index ba33f0edc1a3e16c5ffe62d94e1a9b3c400b9281..024b96c180df915542ae0c23b5f0c9ff8e90bbc7 100644
--- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c
+++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c
@@ -143,12 +143,11 @@ GetItsGroupNodeSize (
 {
   ASSERT (Node != NULL);
 
-  // Size of ITS Group Node
-  UINT32 Size = sizeof (EFI_ACPI_6_0_IO_REMAPPING_ITS_NODE);
-
-  // Size of ITS Identifier array
-  Size += (Node->ItsIdCount * sizeof (UINT32));
-  return Size;
+  /* Size of ITS Group Node +
+     Size of ITS Identifier array
+  */
+  return sizeof (EFI_ACPI_6_0_IO_REMAPPING_ITS_NODE) +
+           (Node->ItsIdCount * sizeof (UINT32));
 }
 
 /** Returns the total size required for the ITS Group nodes and
@@ -175,10 +174,11 @@ GetSizeofItsGroupNodes (
   IN OUT        IORT_NODE_INDEXER     ** CONST NodeIndexer
   )
 {
-  UINT32  Size = 0;
+  UINT32  Size;
 
   ASSERT (NodeList != NULL);
 
+  Size = 0;
   while (NodeCount-- != 0) {
     (*NodeIndexer)->Token = NodeList->Token;
     (*NodeIndexer)->Object = (VOID*)NodeList;
@@ -213,17 +213,14 @@ GetNamedComponentNodeSize (
 {
   ASSERT (Node != NULL);
 
-  // Size of Named Component node
-  UINT32 Size = sizeof (EFI_ACPI_6_0_IO_REMAPPING_NAMED_COMP_NODE);
-
-  // Size of ID mapping array
-  Size += (Node->IdMappingCount * sizeof (EFI_ACPI_6_0_IO_REMAPPING_ID_TABLE));
-
-  /* Size of ASCII string + NULL termination + 'padding to
-     32-bit word aligned'.
+  /* Size of Named Component node +
+     Size of ID mapping array +
+     Size of ASCII string + 'padding to 32-bit word aligned'.
   */
-  Size += ALIGN32 (AsciiStrLen (Node->ObjectName) + 1);
-  return Size;
+  return sizeof (EFI_ACPI_6_0_IO_REMAPPING_NAMED_COMP_NODE) +
+            (Node->IdMappingCount *
+             sizeof (EFI_ACPI_6_0_IO_REMAPPING_ID_TABLE)) +
+            ALIGN32 (AsciiStrSize (Node->ObjectName));
 }
 
 /** Returns the total size required for the Named Component nodes and
@@ -250,10 +247,11 @@ GetSizeofNamedComponentNodes (
   IN OUT        IORT_NODE_INDEXER          ** CONST NodeIndexer
   )
 {
-  UINT32  Size = 0;
+  UINT32  Size;
 
   ASSERT (NodeList != NULL);
 
+  Size = 0;
   while (NodeCount-- != 0) {
     (*NodeIndexer)->Token = NodeList->Token;
     (*NodeIndexer)->Object = (VOID*)NodeList;
@@ -289,13 +287,12 @@ GetRootComplexNodeSize (
 {
   ASSERT (Node != NULL);
 
-  // Size of Root Complex node
-  UINT32 Size = sizeof (EFI_ACPI_6_0_IO_REMAPPING_RC_NODE);
-
-  // Size of ID mapping array
-  Size += (Node->IdMappingCount *
-           sizeof (EFI_ACPI_6_0_IO_REMAPPING_ID_TABLE));
-  return Size;
+  /* Size of Root Complex node +
+     Size of ID mapping array
+  */
+  return sizeof (EFI_ACPI_6_0_IO_REMAPPING_RC_NODE) +
+           (Node->IdMappingCount *
+            sizeof (EFI_ACPI_6_0_IO_REMAPPING_ID_TABLE));
 }
 
 /** Returns the total size required for the Root Complex nodes and
@@ -322,10 +319,11 @@ GetSizeofRootComplexNodes (
   IN OUT        IORT_NODE_INDEXER          ** CONST NodeIndexer
   )
 {
-  UINT32  Size = 0;
+  UINT32  Size;
 
   ASSERT (NodeList != NULL);
 
+  Size = 0;
   while (NodeCount-- != 0) {
     (*NodeIndexer)->Token = NodeList->Token;
     (*NodeIndexer)->Object = (VOID*)NodeList;
@@ -361,21 +359,18 @@ GetSmmuV1V2NodeSize (
 {
   ASSERT (Node != NULL);
 
-  // Size of SMMU v1/SMMU v2 node
-  UINT32 Size = sizeof (EFI_ACPI_6_0_IO_REMAPPING_SMMU_NODE);
-
-  // Size of ID mapping array
-  Size += (Node->IdMappingCount *
-           sizeof (EFI_ACPI_6_0_IO_REMAPPING_ID_TABLE));
-
-  // Size of context interrupt array
-  Size += (Node->ContextInterruptCount *
-           sizeof (EFI_ACPI_6_0_IO_REMAPPING_SMMU_INT));
-
-  // Size of PMU interrupt array
-  Size += (Node->PmuInterruptCount *
-           sizeof (EFI_ACPI_6_0_IO_REMAPPING_SMMU_INT));
-  return Size;
+  /* Size of SMMU v1/SMMU v2 node +
+     Size of ID mapping array +
+     Size of context interrupt array +
+     Size of PMU interrupt array
+  */
+  return sizeof (EFI_ACPI_6_0_IO_REMAPPING_SMMU_NODE) +
+           (Node->IdMappingCount *
+            sizeof (EFI_ACPI_6_0_IO_REMAPPING_ID_TABLE)) +
+           (Node->ContextInterruptCount *
+            sizeof (EFI_ACPI_6_0_IO_REMAPPING_SMMU_INT)) +
+           (Node->PmuInterruptCount *
+            sizeof (EFI_ACPI_6_0_IO_REMAPPING_SMMU_INT));
 }
 
 /** Returns the total size required for the SMMUv1/SMMUv2 nodes and
@@ -402,10 +397,11 @@ GetSizeofSmmuV1V2Nodes (
   IN OUT        IORT_NODE_INDEXER          ** CONST NodeIndexer
   )
 {
-  UINT32  Size = 0;
+  UINT32  Size;
 
   ASSERT (NodeList != NULL);
 
+  Size = 0;
   while (NodeCount-- != 0) {
     (*NodeIndexer)->Token = NodeList->Token;
     (*NodeIndexer)->Object = (VOID*)NodeList;
@@ -440,13 +436,12 @@ GetSmmuV3NodeSize (
 {
   ASSERT (Node != NULL);
 
-  // Size of SMMU v1/SMMU v2 node
-  UINT32 Size = sizeof (EFI_ACPI_6_0_IO_REMAPPING_SMMU3_NODE);
-
-  // Size of ID mapping array
-  Size += (Node->IdMappingCount *
-           sizeof (EFI_ACPI_6_0_IO_REMAPPING_ID_TABLE));
-  return Size;
+  /* Size of SMMU v1/SMMU v2 node +
+     Size of ID mapping array
+  */
+  return sizeof (EFI_ACPI_6_0_IO_REMAPPING_SMMU3_NODE) +
+           (Node->IdMappingCount *
+            sizeof (EFI_ACPI_6_0_IO_REMAPPING_ID_TABLE));
 }
 
 /** Returns the total size required for the SMMUv3 nodes and
@@ -473,10 +468,11 @@ GetSizeofSmmuV3Nodes (
   IN OUT        IORT_NODE_INDEXER   ** CONST NodeIndexer
   )
 {
-  UINT32  Size = 0;
+  UINT32  Size;
 
   ASSERT (NodeList != NULL);
 
+  Size = 0;
   while (NodeCount-- != 0) {
     (*NodeIndexer)->Token = NodeList->Token;
     (*NodeIndexer)->Object = (VOID*)NodeList;
@@ -511,13 +507,12 @@ GetPmcgNodeSize (
 {
   ASSERT (Node != NULL);
 
-  // Size of PMCG node
-  UINT32 Size = sizeof (EFI_ACPI_6_0_IO_REMAPPING_PMCG_NODE);
-
-  // Size of ID mapping array
-  Size += (Node->IdMappingCount *
-           sizeof (EFI_ACPI_6_0_IO_REMAPPING_ID_TABLE));
-  return Size;
+  /* Size of PMCG node +
+     Size of ID mapping array
+  */
+  return sizeof (EFI_ACPI_6_0_IO_REMAPPING_PMCG_NODE) +
+           (Node->IdMappingCount *
+            sizeof (EFI_ACPI_6_0_IO_REMAPPING_ID_TABLE));
 }
 
 /** Returns the total size required for the PMCG nodes and
@@ -544,10 +539,11 @@ GetSizeofPmcgNodes (
   IN OUT        IORT_NODE_INDEXER ** CONST NodeIndexer
   )
 {
-  UINT32  Size = 0;
+  UINT32  Size;
 
   ASSERT (NodeList != NULL);
 
+  Size = 0;
   while (NodeCount-- != 0) {
     (*NodeIndexer)->Token = NodeList->Token;
     (*NodeIndexer)->Object = (VOID*)NodeList;
@@ -650,10 +646,12 @@ AddIdMappingArray (
   EFI_STATUS            Status;
   CM_ARM_ID_MAPPING   * IdMappings;
   UINT32                IdMappingCount;
-  ACPI_IORT_GENERATOR * Generator = (ACPI_IORT_GENERATOR*)This;
+  ACPI_IORT_GENERATOR * Generator;
 
   ASSERT (IdMapArray != NULL);
 
+  Generator = (ACPI_IORT_GENERATOR*)This;
+
   // Get the Id Mapping Array
   Status = GetEArmObjIdMapping (
              CfgMgrProtocol,
@@ -1351,10 +1349,11 @@ AddPmcgNodes (
   EFI_STATUS                             Status;
   EFI_ACPI_6_0_IO_REMAPPING_PMCG_NODE  * PmcgNode;
   EFI_ACPI_6_0_IO_REMAPPING_ID_TABLE   * IdMapArray;
-  ACPI_IORT_GENERATOR                  * Generator = (ACPI_IORT_GENERATOR*)This;
+  ACPI_IORT_GENERATOR                  * Generator;
 
   ASSERT (Iort != NULL);
 
+  Generator = (ACPI_IORT_GENERATOR*)This;
   PmcgNode = (EFI_ACPI_6_0_IO_REMAPPING_PMCG_NODE*)((UINT8*)Iort +
               NodesStartOffset);
 
@@ -2025,7 +2024,8 @@ AcpiIortLibConstructor (
   IN       EFI_SYSTEM_TABLE  * CONST SystemTable
   )
 {
-  EFI_STATUS  Status = RegisterAcpiTableGenerator (&IortGenerator.Header);
+  EFI_STATUS  Status;
+  Status = RegisterAcpiTableGenerator (&IortGenerator.Header);
   DEBUG ((DEBUG_INFO, "IORT: Register Generator. Status = %r\n", Status));
   ASSERT_EFI_ERROR (Status);
   return Status;
@@ -2047,7 +2047,8 @@ AcpiIortLibDestructor (
   IN       EFI_SYSTEM_TABLE  * CONST SystemTable
   )
 {
-  EFI_STATUS  Status = DeregisterAcpiTableGenerator (&IortGenerator.Header);
+  EFI_STATUS  Status;
+  Status = DeregisterAcpiTableGenerator (&IortGenerator.Header);
   DEBUG ((DEBUG_INFO, "Iort: Deregister Generator. Status = %r\n", Status));
   ASSERT_EFI_ERROR (Status);
   return Status;
diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiMadtLibArm/MadtGenerator.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiMadtLibArm/MadtGenerator.c
index 6fa45357ea3c888d1fe35565a35cc074c6967478..bdf902c4c859a29e63a84316614c9e7a29178b93 100644
--- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiMadtLibArm/MadtGenerator.c
+++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiMadtLibArm/MadtGenerator.c
@@ -688,7 +688,8 @@ AcpiMadtLibConstructor (
   IN       EFI_SYSTEM_TABLE  * CONST SystemTable
   )
 {
-  EFI_STATUS  Status = RegisterAcpiTableGenerator (&MadtGenerator);
+  EFI_STATUS  Status;
+  Status = RegisterAcpiTableGenerator (&MadtGenerator);
   DEBUG ((DEBUG_INFO, "MADT: Register Generator. Status = %r\n", Status));
   ASSERT_EFI_ERROR (Status);
   return Status;
@@ -710,7 +711,8 @@ AcpiMadtLibDestructor (
   IN       EFI_SYSTEM_TABLE  * CONST SystemTable
   )
 {
-  EFI_STATUS  Status = DeregisterAcpiTableGenerator (&MadtGenerator);
+  EFI_STATUS  Status;
+  Status = DeregisterAcpiTableGenerator (&MadtGenerator);
   DEBUG ((DEBUG_INFO, "MADT: Deregister Generator. Status = %r\n", Status));
   ASSERT_EFI_ERROR (Status);
   return Status;
diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiMcfgLibArm/McfgGenerator.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiMcfgLibArm/McfgGenerator.c
index 8f623a3d1821e8eabc365ca4dc20e8240df40568..80f0bea8ccfd886eab690b0ea8ae52f1eb5f0728 100644
--- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiMcfgLibArm/McfgGenerator.c
+++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiMcfgLibArm/McfgGenerator.c
@@ -313,7 +313,8 @@ AcpiMcfgLibConstructor (
   IN       EFI_SYSTEM_TABLE  * CONST SystemTable
   )
 {
-  EFI_STATUS  Status = RegisterAcpiTableGenerator (&McfgGenerator);
+  EFI_STATUS  Status;
+  Status = RegisterAcpiTableGenerator (&McfgGenerator);
   DEBUG ((DEBUG_INFO, "MCFG: Register Generator. Status = %r\n", Status));
   ASSERT_EFI_ERROR (Status);
   return Status;
@@ -335,7 +336,8 @@ AcpiMcfgLibDestructor (
   IN       EFI_SYSTEM_TABLE  * CONST SystemTable
   )
 {
-  EFI_STATUS  Status = DeregisterAcpiTableGenerator (&McfgGenerator);
+  EFI_STATUS  Status;
+  Status = DeregisterAcpiTableGenerator (&McfgGenerator);
   DEBUG ((DEBUG_INFO, "MCFG: Deregister Generator. Status = %r\n", Status));
   ASSERT_EFI_ERROR (Status);
   return Status;
diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiRawLibArm/RawGenerator.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiRawLibArm/RawGenerator.c
index ca43d7d7ce2b018389a4196b0a2b80621f26e464..7cd6a088e156323463c8bb220449b57ace32a7a2 100644
--- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiRawLibArm/RawGenerator.c
+++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiRawLibArm/RawGenerator.c
@@ -112,7 +112,8 @@ AcpiRawLibConstructor (
   IN       EFI_SYSTEM_TABLE  * CONST SystemTable
   )
 {
-  EFI_STATUS  Status = RegisterAcpiTableGenerator (&RawGenerator);
+  EFI_STATUS  Status;
+  Status = RegisterAcpiTableGenerator (&RawGenerator);
   DEBUG ((DEBUG_INFO, "RAW: Register Generator. Status = %r\n", Status));
   ASSERT_EFI_ERROR (Status);
   return Status;
@@ -134,7 +135,8 @@ AcpiRawLibDestructor (
   IN       EFI_SYSTEM_TABLE  * CONST SystemTable
   )
 {
-  EFI_STATUS  Status = DeregisterAcpiTableGenerator (&RawGenerator);
+  EFI_STATUS  Status;
+  Status = DeregisterAcpiTableGenerator (&RawGenerator);
   DEBUG ((DEBUG_INFO, "RAW: Deregister Generator. Status = %r\n", Status));
   ASSERT_EFI_ERROR (Status);
   return Status;
diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSpcrLibArm/SpcrGenerator.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSpcrLibArm/SpcrGenerator.c
index 739784a456f23ad81ca8f3918b23adba6bb2429b..381b9e603fb730fad41990f506dcc06127608631 100644
--- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSpcrLibArm/SpcrGenerator.c
+++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSpcrLibArm/SpcrGenerator.c
@@ -295,7 +295,8 @@ AcpiSpcrLibConstructor (
   IN       EFI_SYSTEM_TABLE  * CONST SystemTable
   )
 {
-  EFI_STATUS  Status = RegisterAcpiTableGenerator (&SpcrGenerator);
+  EFI_STATUS  Status;
+  Status = RegisterAcpiTableGenerator (&SpcrGenerator);
   DEBUG ((DEBUG_INFO, "SPCR: Register Generator. Status = %r\n", Status));
   ASSERT_EFI_ERROR (Status);
   return Status;
@@ -317,7 +318,8 @@ AcpiSpcrLibDestructor (
   IN       EFI_SYSTEM_TABLE  * CONST SystemTable
   )
 {
-  EFI_STATUS  Status = DeregisterAcpiTableGenerator (&SpcrGenerator);
+  EFI_STATUS  Status;
+  Status = DeregisterAcpiTableGenerator (&SpcrGenerator);
   DEBUG ((DEBUG_INFO, "SPCR: Deregister Generator. Status = %r\n", Status));
   ASSERT_EFI_ERROR (Status);
   return Status;
-- 
'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'




  parent reply	other threads:[~2018-06-27 16:47 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-27 16:47 [staging/dynamictables PATCH v1 0/5] Fix issues reported by ecc tool Sami Mujawar
2018-06-27 16:47 ` [staging/dynamictables PATCH v1 1/5] DynamicTablesPkg: Add module info to file header Sami Mujawar
2018-06-27 16:47 ` [staging/dynamictables PATCH v1 2/5] DynamicTablesPkg: Fix function documentation Sami Mujawar
2018-06-27 16:47 ` [staging/dynamictables PATCH v1 3/5] DynamicTablesPkg: Fix variable naming issue Sami Mujawar
2018-06-27 16:47 ` [staging/dynamictables PATCH v1 4/5] DynamicTablesPkg: Fix macro to prevent side effect Sami Mujawar
2018-06-28 16:50   ` Leif Lindholm
2018-06-28 17:10     ` Sami Mujawar
2018-06-29  9:41       ` Leif Lindholm
2018-06-27 16:47 ` Sami Mujawar [this message]
2018-06-27 16:57 ` [staging/dynamictables PATCH v1 0/5] Fix issues reported by ecc tool Evan Lloyd
2018-07-02 14:00 ` Leif Lindholm

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=20180627164746.36188-6-sami.mujawar@arm.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