]> git.proxmox.com Git - mirror_edk2.git/commitdiff
StandaloneMmPkg: Fix ECC error 8005 in StandaloneMmCoreEntryPoint
authorSami Mujawar <sami.mujawar@arm.com>
Mon, 7 Dec 2020 13:49:55 +0000 (13:49 +0000)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Thu, 7 Jan 2021 11:13:39 +0000 (11:13 +0000)
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@arm.com>
Acked-by: Jiewen Yao <Jiewen.yao@intel.com>
Acked-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/StandaloneMmCoreEntryPoint.c

index 59391df724ad86334528e084022ba028559fe545..fa2005e7e9e485faff9aedac9cefff7fc6c955e8 100644 (file)
@@ -31,10 +31,10 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 #define SPM_MINOR_VER_MASK        0x0000FFFF\r
 #define SPM_MAJOR_VER_SHIFT       16\r
 \r
-CONST UINT32 SPM_MAJOR_VER = 0;\r
-CONST UINT32 SPM_MINOR_VER = 1;\r
+#define SPM_MAJOR_VER             0\r
+#define SPM_MINOR_VER             1\r
 \r
-CONST UINT8 BOOT_PAYLOAD_VERSION = 1;\r
+#define BOOT_PAYLOAD_VERSION      1\r
 \r
 PI_MM_ARM_TF_CPU_DRIVER_ENTRYPOINT      CpuDriverEntryPoint = NULL;\r
 \r