From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=217.140.96.140; helo=cam-smtp0.cambridge.arm.com; envelope-from=sami.mujawar@arm.com; receiver=edk2-devel@lists.01.org Received: from cam-smtp0.cambridge.arm.com (fw-tnat.cambridge.arm.com [217.140.96.140]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id D6E0F211F8869 for ; Wed, 27 Jun 2018 09:47:56 -0700 (PDT) Received: from E107187.Emea.Arm.com (E107187.Emea.Arm.com [10.1.206.129]) by cam-smtp0.cambridge.arm.com (8.13.8/8.13.8) with ESMTP id w5RGlpOX009420; Wed, 27 Jun 2018 17:47:53 +0100 From: Sami Mujawar 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 Date: Wed, 27 Jun 2018 17:47:44 +0100 Message-Id: <20180627164746.36188-4-sami.mujawar@arm.com> X-Mailer: git-send-email 2.11.0.windows.3 In-Reply-To: <20180627164746.36188-1-sami.mujawar@arm.com> References: <20180627164746.36188-1-sami.mujawar@arm.com> Subject: [staging/dynamictables PATCH v1 3/5] DynamicTablesPkg: Fix variable naming issue X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jun 2018 16:47:57 -0000 Fixed variable naming issues reported by the ecc tool. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Sami Mujawar --- 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)'