[edk2-devel] [PATCH v3 22/26] StandaloneMmPkg: Fix ECC error 8005 in StandaloneMmCoreEntryPoint

Sami Mujawar sami.mujawar at arm.com
Mon Jan 4 13:22:09 UTC 2021


Bugzilla: 3150 (https://bugzilla.tianocore.org/show_bug.cgi?id=3150)

The ECC tool reports error [8005] 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'
for the constants SPM_MAJOR_VER, SPM_MINOR_VER & BOOT_PAYLOAD_VERSION.

Fix this by changing converting these constant variables to #defined
values.

Signed-off-by: Sami Mujawar <sami.mujawar at arm.com>
Acked-by: Jiewen Yao <Jiewen.yao at intel.com>
---

Notes:
    v3:
     - No code change. Added bugzilla ID and resending patch     [SAMI]
       with v3 series.
    
    v2:
     - No code change. Resending patch with v2 series.           [SAMI]

 StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/StandaloneMmCoreEntryPoint.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/StandaloneMmCoreEntryPoint.c b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/StandaloneMmCoreEntryPoint.c
index d097c50360adce7f2280ea4d575971927860706e..1363d54ceebfcbc1d64ff476d4f33bdd626a2422 100644
--- a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/StandaloneMmCoreEntryPoint.c
+++ b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/StandaloneMmCoreEntryPoint.c
@@ -31,10 +31,10 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 #define SPM_MINOR_VER_MASK        0x0000FFFF
 #define SPM_MAJOR_VER_SHIFT       16
 
-CONST UINT32 SPM_MAJOR_VER = 0;
-CONST UINT32 SPM_MINOR_VER = 1;
+#define SPM_MAJOR_VER             0
+#define SPM_MINOR_VER             1
 
-CONST UINT8 BOOT_PAYLOAD_VERSION = 1;
+#define BOOT_PAYLOAD_VERSION      1
 
 PI_MM_ARM_TF_CPU_DRIVER_ENTRYPOINT      CpuDriverEntryPoint = NULL;
 
-- 
'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#69574): https://edk2.groups.io/g/devel/message/69574
Mute This Topic: https://groups.io/mt/79423288/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