From nobody Tue Feb 10 14:33:47 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+70636+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+70636+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1611222727; cv=none; d=zohomail.com; s=zohoarc; b=dSRN/uByoZ0d2ZDyIPMCSBp7i9c3LnrlNdaVg08kgYnfhpsCXnCwrpSfheci1ejRRDApzGcRZkFW0TLSmwyjOYKmPgfoaqdVpqFlbaiF2KsNxFKKJoE3JOR0i1j9TmvtP1tpkajpmpQwbuSjrZ0qSVXhl2hIGHle4BFgcAwX6ao= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611222727; h=Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=vOp5TkVUNLsN78VKaW3V4CVxA3O2a4gy892l3vcT4bs=; b=kjNZxXV7x75gVXm/2TiXgS32qIQHG1PUpod8EI9whg7PtqkSk+UVHIm3L0mlaWKvDXbDigkBOQ1h2o2IziFn4cEtOc6OxfiVdxNSOrVJvew7oUUewlnGU4DXAkytODvQCR1pGFyyVCyKlUW3LOXz//FvQxPDlLO3dYn5BnCvao8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+70636+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1611222727244622.7843749836949; Thu, 21 Jan 2021 01:52:07 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id VZTBYY1788612xNtVsrcNXwK; Thu, 21 Jan 2021 01:52:06 -0800 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web09.5049.1611222726326266662 for ; Thu, 21 Jan 2021 01:52:06 -0800 X-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 141FC14FF; Thu, 21 Jan 2021 01:52:06 -0800 (PST) X-Received: from e120189.arm.com (unknown [10.57.40.199]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id E66933F719; Thu, 21 Jan 2021 01:52:04 -0800 (PST) From: "PierreGondois" To: devel@edk2.groups.io, ardb+tianocore@kernel.org, leif@nuviainc.com Cc: sami.mujawar@arm.com Subject: [edk2-devel] [PATCH v1 20/27] ArmPkg: Fix Ecc error 8005 for SCMI_PROTOCOL_ID Date: Thu, 21 Jan 2021 09:51:12 +0000 Message-Id: <20210121095119.22143-21-Pierre.Gondois@arm.com> In-Reply-To: <20210121095119.22143-1-Pierre.Gondois@arm.com> References: <20210121095119.22143-1-Pierre.Gondois@arm.com> Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,pierre.gondois@arm.com X-Gm-Message-State: AUNnPKtrvu50uSpBNL2vpBeix1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1611222726; bh=aJFcLDP53NVqOxgrdj8zJSlDTz7RjXpoU1VMtLe3jaw=; h=Cc:Date:From:Reply-To:Subject:To; b=TuZYVRJcnZ1OYl8TxMWdAccSk3xkSbVjlTa1bLPxHyZDiS7Lxvgq5O+YlK/RcZsiOtG Zm7tZMwuTc3zUqiAC6eRH3GsxCeMBe0Pm6hbPR0Qbz+eL5EW4jla29Ud+Lfoet6qQJWjH Mlvz9X+WT3KSQ8GESd4CTP6KgLpEUoYyjwk= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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 --- The changes can be seen at: https://github.com/PierreARM/edk2/tree/1552_Ecc= _ArmPkg_BIS_v1 ArmPkg/Drivers/ArmScmiDxe/ScmiBaseProtocol.c | 12 ++++++------ ArmPkg/Drivers/ArmScmiDxe/ScmiClockProtocol.c | 14 +++++++------- ArmPkg/Drivers/ArmScmiDxe/ScmiDxe.c | 10 +++++----- .../ArmScmiDxe/ScmiPerformanceProtocol.c | 18 +++++++++--------- ArmPkg/Drivers/ArmScmiDxe/ScmiPrivate.h | 14 +++++++------- 5 files changed, 34 insertions(+), 34 deletions(-) diff --git a/ArmPkg/Drivers/ArmScmiDxe/ScmiBaseProtocol.c b/ArmPkg/Drivers/= ArmScmiDxe/ScmiBaseProtocol.c index d89587f9edf3..c84ce97f15ac 100644 --- a/ArmPkg/Drivers/ArmScmiDxe/ScmiBaseProtocol.c +++ b/ArmPkg/Drivers/ArmScmiDxe/ScmiBaseProtocol.c @@ -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 @@ -34,7 +34,7 @@ BaseGetVersion ( OUT UINT32 *Version ) { - return ScmiGetProtocolVersion (SCMI_PROTOCOL_ID_BASE, Version); + return ScmiGetProtocolVersion (ScmiProtocolIdBase, Version); } /** Return total number of SCMI protocols supported by the SCP firmware. @@ -57,7 +57,7 @@ BaseGetTotalProtocols ( EFI_STATUS Status; UINT32 *ReturnValues; - Status =3D ScmiGetProtocolAttributes (SCMI_PROTOCOL_ID_BASE, &ReturnValu= es); + Status =3D ScmiGetProtocolAttributes (ScmiProtocolIdBase, &ReturnValues); if (EFI_ERROR (Status)) { return Status; } @@ -91,7 +91,7 @@ BaseDiscoverVendorDetails ( SCMI_COMMAND Cmd; UINT32 PayloadLength; - Cmd.ProtocolId =3D SCMI_PROTOCOL_ID_BASE; + Cmd.ProtocolId =3D ScmiProtocolIdBase; Cmd.MessageId =3D MessageId; PayloadLength =3D 0; @@ -183,7 +183,7 @@ BaseDiscoverImplVersion ( SCMI_COMMAND Cmd; UINT32 PayloadLength; - Cmd.ProtocolId =3D SCMI_PROTOCOL_ID_BASE; + Cmd.ProtocolId =3D ScmiProtocolIdBase; Cmd.MessageId =3D SCMI_MESSAGE_ID_BASE_DISCOVER_IMPLEMENTATION_VERSION; PayloadLength =3D 0; @@ -250,7 +250,7 @@ BaseDiscoverListProtocols ( return EFI_BUFFER_TOO_SMALL; } - Cmd.ProtocolId =3D SCMI_PROTOCOL_ID_BASE; + Cmd.ProtocolId =3D ScmiProtocolIdBase; Cmd.MessageId =3D SCMI_MESSAGE_ID_BASE_DISCOVER_LIST_PROTOCOLS; Skip =3D 0; diff --git a/ArmPkg/Drivers/ArmScmiDxe/ScmiClockProtocol.c b/ArmPkg/Drivers= /ArmScmiDxe/ScmiClockProtocol.c index 5c06e31bda22..b7892bfd7771 100644 --- a/ArmPkg/Drivers/ArmScmiDxe/ScmiClockProtocol.c +++ b/ArmPkg/Drivers/ArmScmiDxe/ScmiClockProtocol.c @@ -52,7 +52,7 @@ ClockGetVersion ( OUT UINT32 *Version ) { - return ScmiGetProtocolVersion (SCMI_PROTOCOL_ID_CLOCK, Version); + return ScmiGetProtocolVersion (ScmiProtocolIdClock, Version); } /** Return total number of clock devices supported by the clock management @@ -76,7 +76,7 @@ ClockGetTotalClocks ( EFI_STATUS Status; UINT32 *ReturnValues; - Status =3D ScmiGetProtocolAttributes (SCMI_PROTOCOL_ID_CLOCK, &ReturnVal= ues); + Status =3D ScmiGetProtocolAttributes (ScmiProtocolIdClock, &ReturnValues= ); if (EFI_ERROR (Status)) { return Status; } @@ -122,7 +122,7 @@ ClockGetClockAttributes ( *MessageParams =3D ClockId; - Cmd.ProtocolId =3D SCMI_PROTOCOL_ID_CLOCK; + Cmd.ProtocolId =3D ScmiProtocolIdClock; Cmd.MessageId =3D SCMI_MESSAGE_ID_CLOCK_ATTRIBUTES; PayloadLength =3D sizeof (ClockId); @@ -203,7 +203,7 @@ ClockDescribeRates ( return Status; } - Cmd.ProtocolId =3D SCMI_PROTOCOL_ID_CLOCK; + Cmd.ProtocolId =3D ScmiProtocolIdClock; Cmd.MessageId =3D SCMI_MESSAGE_ID_CLOCK_DESCRIBE_RATES; *MessageParams++ =3D ClockId; @@ -320,7 +320,7 @@ ClockRateGet ( // Fill arguments for clock protocol command. *MessageParams =3D ClockId; - Cmd.ProtocolId =3D SCMI_PROTOCOL_ID_CLOCK; + Cmd.ProtocolId =3D ScmiProtocolIdClock; Cmd.MessageId =3D SCMI_MESSAGE_ID_CLOCK_RATE_GET; PayloadLength =3D sizeof (ClockId); @@ -374,7 +374,7 @@ ClockRateSet ( ClockRateSetAttributes->Rate.Low =3D (UINT32)Rate; ClockRateSetAttributes->Rate.High =3D (UINT32)(Rate >> 32); - Cmd.ProtocolId =3D SCMI_PROTOCOL_ID_CLOCK; + Cmd.ProtocolId =3D ScmiProtocolIdClock; Cmd.MessageId =3D SCMI_MESSAGE_ID_CLOCK_RATE_SET; PayloadLength =3D sizeof (CLOCK_RATE_SET_ATTRIBUTES); @@ -421,7 +421,7 @@ ClockEnable ( ClockConfigSetAttributes->ClockId =3D ClockId; ClockConfigSetAttributes->Attributes =3D Enable ? BIT0 : 0; - Cmd.ProtocolId =3D SCMI_PROTOCOL_ID_CLOCK; + Cmd.ProtocolId =3D ScmiProtocolIdClock; Cmd.MessageId =3D SCMI_MESSAGE_ID_CLOCK_CONFIG_SET; PayloadLength =3D sizeof (CLOCK_CONFIG_SET_ATTRIBUTES); diff --git a/ArmPkg/Drivers/ArmScmiDxe/ScmiDxe.c b/ArmPkg/Drivers/ArmScmiDx= e/ScmiDxe.c index e95f56e670ed..d5890a7633a2 100644 --- a/ArmPkg/Drivers/ArmScmiDxe/ScmiDxe.c +++ b/ArmPkg/Drivers/ArmScmiDxe/ScmiDxe.c @@ -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 @@ -24,9 +24,9 @@ #include "ScmiPrivate.h" STATIC CONST SCMI_PROTOCOL_ENTRY Protocols[] =3D { - { SCMI_PROTOCOL_ID_BASE, ScmiBaseProtocolInit }, - { SCMI_PROTOCOL_ID_PERFORMANCE, ScmiPerformanceProtocolInit }, - { SCMI_PROTOCOL_ID_CLOCK, ScmiClockProtocolInit } + { ScmiProtocolIdBase, ScmiBaseProtocolInit }, + { ScmiProtocolIdPerformance, ScmiPerformanceProtocolInit }, + { ScmiProtocolIdClock, ScmiClockProtocolInit } }; /** ARM SCMI driver entry point function. @@ -61,7 +61,7 @@ ArmScmiDxeEntryPoint ( UINT32 SupportedListSize; // Every SCMI implementation must implement the base protocol. - ASSERT (Protocols[0].Id =3D=3D SCMI_PROTOCOL_ID_BASE); + ASSERT (Protocols[0].Id =3D=3D ScmiProtocolIdBase); Status =3D ScmiBaseProtocolInit (&ImageHandle); if (EFI_ERROR (Status)) { diff --git a/ArmPkg/Drivers/ArmScmiDxe/ScmiPerformanceProtocol.c b/ArmPkg/D= rivers/ArmScmiDxe/ScmiPerformanceProtocol.c index 712f95d6ea40..51cad4d2c602 100644 --- a/ArmPkg/Drivers/ArmScmiDxe/ScmiPerformanceProtocol.c +++ b/ArmPkg/Drivers/ArmScmiDxe/ScmiPerformanceProtocol.c @@ -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 @@ -35,7 +35,7 @@ PerformanceGetVersion ( OUT UINT32 *Version ) { - return ScmiGetProtocolVersion (SCMI_PROTOCOL_ID_PERFORMANCE, Version); + return ScmiGetProtocolVersion (ScmiProtocolIdPerformance, Version); } /** Return protocol attributes of the performance management protocol. @@ -59,7 +59,7 @@ PerformanceGetAttributes ( UINT32* ReturnValues; Status =3D ScmiGetProtocolAttributes ( - SCMI_PROTOCOL_ID_PERFORMANCE, + ScmiProtocolIdPerformance, &ReturnValues ); if (EFI_ERROR (Status)) { @@ -107,7 +107,7 @@ PerformanceDomainAttributes ( *MessageParams =3D DomainId; - Cmd.ProtocolId =3D SCMI_PROTOCOL_ID_PERFORMANCE; + Cmd.ProtocolId =3D ScmiProtocolIdPerformance; Cmd.MessageId =3D SCMI_MESSAGE_ID_PERFORMANCE_DOMAIN_ATTRIBUTES; PayloadLength =3D sizeof (DomainId); @@ -179,7 +179,7 @@ PerformanceDescribeLevels ( *MessageParams++ =3D DomainId; - Cmd.ProtocolId =3D SCMI_PROTOCOL_ID_PERFORMANCE; + Cmd.ProtocolId =3D ScmiProtocolIdPerformance; Cmd.MessageId =3D SCMI_MESSAGE_ID_PERFORMANCE_DESCRIBE_LEVELS; do { @@ -258,7 +258,7 @@ PerformanceLimitsSet ( *MessageParams++ =3D Limits->RangeMax; *MessageParams =3D Limits->RangeMin; - Cmd.ProtocolId =3D SCMI_PROTOCOL_ID_PERFORMANCE; + Cmd.ProtocolId =3D ScmiProtocolIdPerformance; Cmd.MessageId =3D SCMI_MESSAGE_ID_PERFORMANCE_LIMITS_SET; PayloadLength =3D sizeof (DomainId) + sizeof (SCMI_PERFORMANCE_LIMITS); @@ -304,7 +304,7 @@ PerformanceLimitsGet ( *MessageParams =3D DomainId; - Cmd.ProtocolId =3D SCMI_PROTOCOL_ID_PERFORMANCE; + Cmd.ProtocolId =3D ScmiProtocolIdPerformance; Cmd.MessageId =3D SCMI_MESSAGE_ID_PERFORMANCE_LIMITS_GET; PayloadLength =3D sizeof (DomainId); @@ -354,7 +354,7 @@ PerformanceLevelSet ( *MessageParams++ =3D DomainId; *MessageParams =3D Level; - Cmd.ProtocolId =3D SCMI_PROTOCOL_ID_PERFORMANCE; + Cmd.ProtocolId =3D ScmiProtocolIdPerformance; Cmd.MessageId =3D SCMI_MESSAGE_ID_PERFORMANCE_LEVEL_SET; PayloadLength =3D sizeof (DomainId) + sizeof (Level); @@ -399,7 +399,7 @@ PerformanceLevelGet ( *MessageParams =3D DomainId; - Cmd.ProtocolId =3D SCMI_PROTOCOL_ID_PERFORMANCE; + Cmd.ProtocolId =3D ScmiProtocolIdPerformance; Cmd.MessageId =3D SCMI_MESSAGE_ID_PERFORMANCE_LEVEL_GET; PayloadLength =3D sizeof (DomainId); diff --git a/ArmPkg/Drivers/ArmScmiDxe/ScmiPrivate.h b/ArmPkg/Drivers/ArmSc= miDxe/ScmiPrivate.h index 7763c848aedc..5f1225f54cd9 100644 --- a/ArmPkg/Drivers/ArmScmiDxe/ScmiPrivate.h +++ b/ArmPkg/Drivers/ArmScmiDxe/ScmiPrivate.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 @@ -13,12 +13,12 @@ // SCMI protocol IDs. typedef enum { - SCMI_PROTOCOL_ID_BASE =3D 0x10, - SCMI_PROTOCOL_ID_POWER_DOMAIN =3D 0x11, - SCMI_PROTOCOL_ID_SYSTEM_POWER =3D 0x12, - SCMI_PROTOCOL_ID_PERFORMANCE =3D 0x13, - SCMI_PROTOCOL_ID_CLOCK =3D 0x14, - SCMI_PROTOCOL_ID_SENSOR =3D 0x15 + ScmiProtocolIdBase =3D 0x10, + ScmiProtocolIdPowerDomain =3D 0x11, + ScmiProtocolIdSystemPower =3D 0x12, + ScmiProtocolIdPerformance =3D 0x13, + ScmiProtocolIdClock =3D 0x14, + ScmiProtocolIdSensor =3D 0x15 } SCMI_PROTOCOL_ID; // SCMI message types. -- 2.17.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#70636): https://edk2.groups.io/g/devel/message/70636 Mute This Topic: https://groups.io/mt/80000394/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-