From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web12.9512.1614086095391622286 for ; Tue, 23 Feb 2021 05:14:55 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: pierre.gondois@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 18FE1101E; Tue, 23 Feb 2021 05:14:55 -0800 (PST) Received: from e120189.arm.com (unknown [10.57.9.161]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id CFEF23F70D; Tue, 23 Feb 2021 05:14:53 -0800 (PST) From: "PierreGondois" To: devel@edk2.groups.io, ardb+tianocore@kernel.org, leif@nuviainc.com, sami.mujawar@arm.com Subject: [PATCH v3 25/26] ArmPkg: Fix Ecc error 8005 for SCMI_CLOCK_RATE_FORMAT Date: Tue, 23 Feb 2021 13:14:05 +0000 Message-Id: <20210223131406.3484-26-Pierre.Gondois@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210223131406.3484-1-Pierre.Gondois@arm.com> References: <20210223131406.3484-1-Pierre.Gondois@arm.com> From: Pierre Gondois This patch fixes the following Ecc reported error: Variable name does not follow the rules: 1. First character should be upper case 2. Must contain lower case characters 3. No white space characters 4. Global variable name must start with a 'g' Signed-off-by: Pierre Gondois Reviewed-by: Sami Mujawar --- The changes can be seen at: https://github.com/PierreARM/edk2/tree/1552_Ecc_ArmPkg_BIS_v3 ArmPkg/Drivers/ArmScmiDxe/ScmiClockProtocol.c | 8 ++++---- ArmPkg/Include/Protocol/ArmScmiClock2Protocol.h | 6 +++--- ArmPkg/Include/Protocol/ArmScmiClockProtocol.h | 8 ++++---- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/ArmPkg/Drivers/ArmScmiDxe/ScmiClockProtocol.c b/ArmPkg/Drivers/ArmScmiDxe/ScmiClockProtocol.c index 9cd3a7ed232d..cc223d672028 100644 --- a/ArmPkg/Drivers/ArmScmiDxe/ScmiClockProtocol.c +++ b/ArmPkg/Drivers/ArmScmiDxe/ScmiClockProtocol.c @@ -152,10 +152,10 @@ ClockGetClockAttributes ( @param[in] This A pointer to SCMI_CLOCK_PROTOCOL Instance. @param[in] ClockId Identifier for the clock device. - @param[out] Format SCMI_CLOCK_RATE_FORMAT_DISCRETE: Clock device + @param[out] Format ScmiClockRateFormatDiscrete: Clock device supports range of clock rates which are non-linear. - SCMI_CLOCK_RATE_FORMAT_LINEAR: Clock device supports + ScmiClockRateFormatLinear: Clock device supports range of linear clock rates from Min to Max in steps. @param[out] TotalRates Total number of rates. @@ -236,7 +236,7 @@ ClockDescribeRates ( *TotalRates = NUM_RATES (DescribeRates->NumRatesFlags) + NUM_REMAIN_RATES (DescribeRates->NumRatesFlags); - if (*Format == SCMI_CLOCK_RATE_FORMAT_DISCRETE) { + if (*Format == ScmiClockRateFormatDiscrete) { RequiredArraySize = (*TotalRates) * sizeof (UINT64); } else { // We need to return triplet of 64 bit value for each rate @@ -251,7 +251,7 @@ ClockDescribeRates ( RateOffset = 0; - if (*Format == SCMI_CLOCK_RATE_FORMAT_DISCRETE) { + if (*Format == ScmiClockRateFormatDiscrete) { for (RateNo = 0; RateNo < NUM_RATES (DescribeRates->NumRatesFlags); RateNo++) { Rate = &DescribeRates->Rates[RateOffset++]; // Non-linear discrete rates. diff --git a/ArmPkg/Include/Protocol/ArmScmiClock2Protocol.h b/ArmPkg/Include/Protocol/ArmScmiClock2Protocol.h index 950141cbd2da..0e26491a62c4 100644 --- a/ArmPkg/Include/Protocol/ArmScmiClock2Protocol.h +++ b/ArmPkg/Include/Protocol/ArmScmiClock2Protocol.h @@ -1,6 +1,6 @@ /** @file - Copyright (c) 2017-2018, Arm Limited. All rights reserved. + Copyright (c) 2017-2021, Arm Limited. All rights reserved. SPDX-License-Identifier: BSD-2-Clause-Patent @@ -89,10 +89,10 @@ EFI_STATUS @param[in] This A pointer to SCMI_CLOCK2_PROTOCOL Instance. @param[in] ClockId Identifier for the clock device. - @param[out] Format SCMI_CLOCK_RATE_FORMAT_DISCRETE: Clock device + @param[out] Format ScmiClockRateFormatDiscrete: Clock device supports range of clock rates which are non-linear. - SCMI_CLOCK_RATE_FORMAT_LINEAR: Clock device supports + ScmiClockRateFormatLinear: Clock device supports range of linear clock rates from Min to Max in steps. @param[out] TotalRates Total number of rates. diff --git a/ArmPkg/Include/Protocol/ArmScmiClockProtocol.h b/ArmPkg/Include/Protocol/ArmScmiClockProtocol.h index cd62f05a58fd..4210a53cf98d 100644 --- a/ArmPkg/Include/Protocol/ArmScmiClockProtocol.h +++ b/ArmPkg/Include/Protocol/ArmScmiClockProtocol.h @@ -30,8 +30,8 @@ typedef enum { } SCMI_MESSAGE_ID_CLOCK; typedef enum { - SCMI_CLOCK_RATE_FORMAT_DISCRETE, // Non-linear range. - SCMI_CLOCK_RATE_FORMAT_LINEAR // Linear range. + ScmiClockRateFormatDiscrete, // Non-linear range. + ScmiClockRateFormatLinear // Linear range. } SCMI_CLOCK_RATE_FORMAT; // Clock management protocol version. @@ -139,10 +139,10 @@ EFI_STATUS @param[in] This A pointer to SCMI_CLOCK_PROTOCOL Instance. @param[in] ClockId Identifier for the clock device. - @param[out] Format SCMI_CLOCK_RATE_FORMAT_DISCRETE: Clock device + @param[out] Format ScmiClockRateFormatDiscrete: Clock device supports range of clock rates which are non-linear. - SCMI_CLOCK_RATE_FORMAT_LINEAR: Clock device supports + ScmiClockRateFormatLinear: Clock device supports range of linear clock rates from Min to Max in steps. @param[out] TotalRates Total number of rates. -- 2.17.1