[edk2-devel] [PATCH v1 22/27] ArmPkg: Fix Ecc error 8005 for SCMI_STATUS

PierreGondois pierre.gondois at arm.com
Thu Jan 21 09:51:14 UTC 2021


From: Pierre Gondois <Pierre.Gondois at arm.com>

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 <Pierre.Gondois at arm.com>
---
The changes can be seen at: https://github.com/PierreARM/edk2/tree/1552_Ecc_ArmPkg_BIS_v1

 ArmPkg/Drivers/ArmScmiDxe/Scmi.c        |  2 +-
 ArmPkg/Drivers/ArmScmiDxe/ScmiPrivate.h | 22 +++++++++++-----------
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/ArmPkg/Drivers/ArmScmiDxe/Scmi.c b/ArmPkg/Drivers/ArmScmiDxe/Scmi.c
index 25f6cc3371af..a1bf1b95c052 100644
--- a/ArmPkg/Drivers/ArmScmiDxe/Scmi.c
+++ b/ArmPkg/Drivers/ArmScmiDxe/Scmi.c
@@ -123,7 +123,7 @@ ScmiCommandExecute (

   Response = (SCMI_MESSAGE_RESPONSE*)MtlGetChannelPayload (Channel);

-  if (Response->Status != SCMI_SUCCESS) {
+  if (Response->Status != ScmiSuccess) {
     DEBUG ((DEBUG_ERROR, "SCMI error: ProtocolId = 0x%x, MessageId = 0x%x, error = %d\n",
       Command->ProtocolId,
       Command->MessageId,
diff --git a/ArmPkg/Drivers/ArmScmiDxe/ScmiPrivate.h b/ArmPkg/Drivers/ArmScmiDxe/ScmiPrivate.h
index 6de57a5c9514..118961dbe219 100644
--- a/ArmPkg/Drivers/ArmScmiDxe/ScmiPrivate.h
+++ b/ArmPkg/Drivers/ArmScmiDxe/ScmiPrivate.h
@@ -30,17 +30,17 @@ typedef enum {

 // SCMI response error codes.
 typedef enum {
-  SCMI_SUCCESS            =  0,
-  SCMI_NOT_SUPPORTED      = -1,
-  SCMI_INVALID_PARAMETERS = -2,
-  SCMI_DENIED             = -3,
-  SCMI_NOT_FOUND          = -4,
-  SCMI_OUT_OF_RANGE       = -5,
-  SCMI_BUSY               = -6,
-  SCMI_COMMS_ERROR        = -7,
-  SCMI_GENERIC_ERROR      = -8,
-  SCMI_HARDWARE_ERROR     = -9,
-  SCMI_PROTOCOL_ERROR     = -10
+  ScmiSuccess           =  0,
+  ScmiNotSupported      = -1,
+  ScmiInvalidParameters = -2,
+  ScmiDenied            = -3,
+  ScmiNotFound          = -4,
+  ScmiOutOfRange        = -5,
+  ScmiBusy              = -6,
+  ScmiCommsError        = -7,
+  ScmiGenericError      = -8,
+  ScmiHardwareError     = -9,
+  ScmiProtocolError     = -10
 } SCMI_STATUS;

 // SCMI message IDs common to all protocols.
--
2.17.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#70638): https://edk2.groups.io/g/devel/message/70638
Mute This Topic: https://groups.io/mt/80000397/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-





More information about the edk2-devel-archive mailing list