fix(versal-net): 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: Icba1860d789d3826a58b3d83b65ca86a7b364c46
Signed-off-by: Maheedhar Bollapalli <maheedharsai.bollapalli@amd.com>
This commit is contained in:
Maheedhar Bollapalli 2024-10-08 05:50:05 +00:00
parent e452826ad3
commit 4d2b4e4dd7
2 changed files with 7 additions and 7 deletions

View file

@ -60,11 +60,11 @@ char *board_name_decode(void)
void board_detection(void)
{
uint32_t version;
uint32_t version_type;
version = mmio_read_32(PMC_TAP_VERSION);
platform_id = FIELD_GET(PLATFORM_MASK, version);
platform_version = FIELD_GET(PLATFORM_VERSION_MASK, version);
version_type = mmio_read_32(PMC_TAP_VERSION);
platform_id = FIELD_GET(PLATFORM_MASK, version_type);
platform_version = FIELD_GET(PLATFORM_VERSION_MASK, version_type);
if (platform_id == VERSAL_NET_QEMU_COSIM) {
platform_id = VERSAL_NET_QEMU;

View file

@ -59,7 +59,7 @@ static int32_t versal_net_pwr_domain_on(u_register_t mpidr)
*/
static void versal_net_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);
@ -83,9 +83,9 @@ static void versal_net_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);