fix(zynqmp): variable conflicting with external linkage
This corrects the MISRA violation C2012-5.8:
Identifiers that define objects or functions with
external linkage shall be unique.
Modify the variable name to prevent conflict with
external object linkage.
Change-Id: I32bed542c4810508174029ab0aaec18bcdf849a5
Signed-off-by: Maheedhar Bollapalli <maheedharsai.bollapalli@amd.com>
diff --git a/plat/xilinx/zynqmp/pm_service/zynqmp_pm_api_sys.c b/plat/xilinx/zynqmp/pm_service/zynqmp_pm_api_sys.c
index 079f89e..719ab6f 100644
--- a/plat/xilinx/zynqmp/pm_service/zynqmp_pm_api_sys.c
+++ b/plat/xilinx/zynqmp/pm_service/zynqmp_pm_api_sys.c
@@ -769,7 +769,7 @@
enum pm_ret_status check_api_dependency(uint8_t id)
{
uint8_t i;
- uint32_t version;
+ uint32_t version_type;
int ret;
for (i = 0U; i < ARRAY_SIZE(api_dep_table); i++) {
@@ -779,13 +779,13 @@
}
ret = fw_api_version(api_dep_table[i].api_id,
- &version, 1);
+ &version_type, 1);
if (ret != PM_RET_SUCCESS) {
return ret;
}
/* Check if fw version matches TF-A expected version */
- if (version != tfa_expected_ver_id[api_dep_table[i].api_id]) {
+ if (version_type != tfa_expected_ver_id[api_dep_table[i].api_id]) {
return PM_RET_ERROR_NOTSUPPORTED;
}
}
diff --git a/plat/xilinx/zynqmp/pm_service/zynqmp_pm_svc_main.c b/plat/xilinx/zynqmp/pm_service/zynqmp_pm_svc_main.c
index c3a9e51..738699e 100644
--- a/plat/xilinx/zynqmp/pm_service/zynqmp_pm_svc_main.c
+++ b/plat/xilinx/zynqmp/pm_service/zynqmp_pm_svc_main.c
@@ -556,12 +556,12 @@
case PM_FEATURE_CHECK:
{
- uint32_t version = 0;
+ uint32_t version_type = 0;
uint32_t bit_mask[2] = {0};
- ret = pm_feature_check(pm_arg[0], &version, bit_mask,
+ ret = pm_feature_check(pm_arg[0], &version_type, bit_mask,
ARRAY_SIZE(bit_mask));
- SMC_RET2(handle, ((uint64_t)ret | ((uint64_t)version << 32U)),
+ SMC_RET2(handle, ((uint64_t)ret | ((uint64_t)version_type << 32U)),
((uint64_t)bit_mask[0] | ((uint64_t)bit_mask[1] << 32U)));
}