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 3/5] DynamicTablesPkg: Fix variable naming issue
Date: Wed, 27 Jun 2018 17:47:44 +0100	[thread overview]
Message-ID: <20180627164746.36188-4-sami.mujawar@arm.com> (raw)
In-Reply-To: <20180627164746.36188-1-sami.mujawar@arm.com>

Fixed variable naming issues 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 | 24 ++++++++++----------
 DynamicTablesPkg/Library/Acpi/Arm/AcpiGtdtLibArm/GtdtGenerator.c         | 10 ++++----
 2 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/DynamicTablesPkg/Drivers/DynamicTableManagerDxe/DynamicTableManagerDxe.c b/DynamicTablesPkg/Drivers/DynamicTableManagerDxe/DynamicTableManagerDxe.c
index 43c750aa9b3b99cb7d721e96d641bbbef1033a85..bb1744c4ea0eaf05d0d5f356cefdab0fe6faf488 100644
--- a/DynamicTablesPkg/Drivers/DynamicTableManagerDxe/DynamicTableManagerDxe.c
+++ b/DynamicTablesPkg/Drivers/DynamicTableManagerDxe/DynamicTableManagerDxe.c
@@ -301,7 +301,7 @@ ProcessAcpiTables (
   EFI_ACPI_TABLE_PROTOCOL     * AcpiTableProtocol;
   CM_STD_OBJ_ACPI_TABLE_INFO  * AcpiTableInfo;
   UINT32                        AcpiTableCount;
-  UINT32                        idx;
+  UINT32                        Idx;
 
   ASSERT (TableFactoryProtocol != NULL);
   ASSERT (CfgMgrProtocol != NULL);
@@ -367,14 +367,14 @@ ProcessAcpiTables (
   }
 
   // Add the FADT Table first.
-  for (idx = 0; idx < AcpiTableCount; idx++) {
+  for (Idx = 0; Idx < AcpiTableCount; Idx++) {
     if (CREATE_STD_ACPI_TABLE_GEN_ID (ESTD_ACPI_TABLE_ID_FADT) ==
-        AcpiTableInfo[idx].TableGeneratorId) {
+        AcpiTableInfo[Idx].TableGeneratorId) {
       Status = BuildAndInstallAcpiTable (
                  TableFactoryProtocol,
                  CfgMgrProtocol,
                  AcpiTableProtocol,
-                 &AcpiTableInfo[idx]
+                 &AcpiTableInfo[Idx]
                  );
       if (EFI_ERROR (Status)) {
         DEBUG ((
@@ -390,29 +390,29 @@ ProcessAcpiTables (
   } // for
 
   // Add remaining ACPI Tables
-  for (idx = 0; idx < AcpiTableCount; idx++) {
+  for (Idx = 0; Idx < AcpiTableCount; Idx++) {
     DEBUG ((
       DEBUG_INFO,
       "INFO: AcpiTableInfo[%d].TableGeneratorId = 0x%x\n",
-      idx,
-      AcpiTableInfo[idx].TableGeneratorId
+      Idx,
+      AcpiTableInfo[Idx].TableGeneratorId
       ));
 
     // Skip FADT Table since we have already added
     if (CREATE_STD_ACPI_TABLE_GEN_ID (ESTD_ACPI_TABLE_ID_FADT) ==
-        AcpiTableInfo[idx].TableGeneratorId) {
+        AcpiTableInfo[Idx].TableGeneratorId) {
       continue;
     }
 
     // Skip the Reserved table Generator ID
     if ((CREATE_STD_ACPI_TABLE_GEN_ID (ESTD_ACPI_TABLE_ID_RESERVED) >=
-           AcpiTableInfo[idx].TableGeneratorId)                     ||
+           AcpiTableInfo[Idx].TableGeneratorId)                     ||
         (CREATE_STD_ACPI_TABLE_GEN_ID (ESTD_ACPI_TABLE_ID_MAX)      <=
-           AcpiTableInfo[idx].TableGeneratorId)) {
+           AcpiTableInfo[Idx].TableGeneratorId)) {
       DEBUG ((
         DEBUG_WARN,
         "WARNING: Invalid ACPI Generator table ID = 0x%x, Skipping...\n",
-        AcpiTableInfo[idx].TableGeneratorId
+        AcpiTableInfo[Idx].TableGeneratorId
         ));
       continue;
     }
@@ -421,7 +421,7 @@ ProcessAcpiTables (
                TableFactoryProtocol,
                CfgMgrProtocol,
                AcpiTableProtocol,
-               &AcpiTableInfo[idx]
+               &AcpiTableInfo[Idx]
                );
     if (EFI_ERROR (Status)) {
       DEBUG ((
diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiGtdtLibArm/GtdtGenerator.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiGtdtLibArm/GtdtGenerator.c
index e5b0dfa3ed11ea4cc3098d6d0a811012e9dc284e..2f0531f1d69f33b70280e03d02d61009244b3bea 100644
--- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiGtdtLibArm/GtdtGenerator.c
+++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiGtdtLibArm/GtdtGenerator.c
@@ -382,7 +382,7 @@ BuildGtdtTable (
   CM_ARM_GENERIC_WATCHDOG_INFO                  * WatchdogInfoList;
   CM_ARM_GTBLOCK_INFO                           * GTBlockInfo;
   EFI_ACPI_6_2_GENERIC_TIMER_DESCRIPTION_TABLE  * Gtdt;
-  UINT32                                          idx;
+  UINT32                                          Idx;
   UINT32                                          GTBlockOffset;
   UINT32                                          WatchdogOffset = 0;
 
@@ -441,20 +441,20 @@ BuildGtdtTable (
     TableSize += (sizeof (EFI_ACPI_6_2_GTDT_GT_BLOCK_STRUCTURE) *
                   BlockTimerCount);
 
-    for (idx = 0; idx < BlockTimerCount; idx++) {
-      if (GTBlockInfo[idx].GTBlockTimerFrameCount > 8) {
+    for (Idx = 0; Idx < BlockTimerCount; Idx++) {
+      if (GTBlockInfo[Idx].GTBlockTimerFrameCount > 8) {
         Status = EFI_INVALID_PARAMETER;
         DEBUG ((
           DEBUG_ERROR,
           "GTDT: GTBockFrameCount cannot be more than 8." \
           " GTBockFrameCount = %d, Status = %r\n",
-          GTBlockInfo[idx].GTBlockTimerFrameCount,
+          GTBlockInfo[Idx].GTBlockTimerFrameCount,
           Status
           ));
         goto error_handler;
       }
       TableSize += (sizeof (EFI_ACPI_6_2_GTDT_GT_BLOCK_TIMER_STRUCTURE) *
-        GTBlockInfo[idx].GTBlockTimerFrameCount);
+        GTBlockInfo[Idx].GTBlockTimerFrameCount);
     }
 
     DEBUG ((
-- 
'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 ` Sami Mujawar [this message]
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 ` [staging/dynamictables PATCH v1 5/5] DynamicTablesPkg: Fix variable declaration Sami Mujawar
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-4-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