From e452826ad3aa595f720be2c2500ada2f27d3eaea Mon Sep 17 00:00:00 2001 From: Maheedhar Bollapalli Date: Tue, 8 Oct 2024 05:42:28 +0000 Subject: [PATCH] fix(versal): 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: I118fc302e6c37ba589a2871a7c59a694314910c2 Signed-off-by: Maheedhar Bollapalli --- plat/xilinx/versal/plat_psci.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plat/xilinx/versal/plat_psci.c b/plat/xilinx/versal/plat_psci.c index 9acf24e2b..3fc6dbd3b 100644 --- a/plat/xilinx/versal/plat_psci.c +++ b/plat/xilinx/versal/plat_psci.c @@ -197,7 +197,7 @@ static void __dead2 versal_system_reset(void) */ static void versal_pwr_domain_off(const psci_power_state_t *target_state) { - uint32_t ret, fw_api_version, version[RET_PAYLOAD_ARG_CNT] = {0U}; + uint32_t ret, fw_api_version, version_type[RET_PAYLOAD_ARG_CNT] = {0U}; uint32_t cpu_id = plat_my_core_pos(); const struct pm_proc *proc = pm_get_proc(cpu_id); @@ -221,9 +221,9 @@ static void versal_pwr_domain_off(const psci_power_state_t *target_state) * invoking CPU_on function, during which resume address will * be set. */ - ret = pm_feature_check((uint32_t)PM_SELF_SUSPEND, &version[0], SECURE_FLAG); + ret = pm_feature_check((uint32_t)PM_SELF_SUSPEND, &version_type[0], SECURE_FLAG); if (ret == PM_RET_SUCCESS) { - fw_api_version = version[0] & 0xFFFFU; + fw_api_version = version_type[0] & 0xFFFFU; if (fw_api_version >= 3U) { (void)pm_self_suspend(proc->node_id, MAX_LATENCY, PM_STATE_CPU_OFF, 0, SECURE_FLAG);