fix(xilinx): resolve misra rule 4.5 violations
Fixed below MISRA violation:
- MISRA Violation: MISRA-C:2012 R.4.5:
- Identifiers in the same name space with overlapping visibility should
be typographically unambiguous.
- Fix:
- Renamed PM_RET_ERROR_NOFEATURE to PM_RET_ERROR_IOCTL_NOT_SUPPORTED
and removed unnecessary macro definitions.
Change-Id: I6f03e619979685df7418fbccad7b0934d136776e
Signed-off-by: Devanshi Chauhan Alpeshbhai <devanshi.chauhanalpeshbhai@amd.com>
diff --git a/plat/amd/versal2/plat_psci.c b/plat/amd/versal2/plat_psci.c
index d53d751..cded1f3 100644
--- a/plat/amd/versal2/plat_psci.c
+++ b/plat/amd/versal2/plat_psci.c
@@ -19,7 +19,6 @@
#include <plat_private.h>
#include <pm_defs.h>
-#define PM_RET_ERROR_NOFEATURE U(19)
#define ALWAYSTRUE true
#define LINEAR_MODE BIT(1)
@@ -192,7 +191,7 @@
case IOCTL_USB_SET_STATE:
break;
default:
- ret = PM_RET_ERROR_NOFEATURE;
+ ret = PM_RET_ERROR_IOCTL_NOT_SUPPORTED;
break;
}
diff --git a/plat/xilinx/common/include/pm_defs.h b/plat/xilinx/common/include/pm_defs.h
index 352257a..2d2ae64 100644
--- a/plat/xilinx/common/include/pm_defs.h
+++ b/plat/xilinx/common/include/pm_defs.h
@@ -209,7 +209,7 @@
* @PM_RET_SUCCESS: success.
* @PM_RET_ERROR_ARGS: illegal arguments provided (deprecated).
* @PM_RET_ERROR_NOTSUPPORTED: feature not supported (deprecated).
- * @PM_RET_ERROR_NOFEATURE: feature is not available.
+ * @PM_RET_ERROR_IOCTL_NOT_SUPPORTED: IOCTL is not supported.
* @PM_RET_ERROR_INVALID_CRC: invalid crc in IPI communication.
* @PM_RET_ERROR_NOT_ENABLED: feature is not enabled.
* @PM_RET_ERROR_INTERNAL: internal error.
@@ -227,7 +227,7 @@
PM_RET_SUCCESS,
PM_RET_ERROR_ARGS = 1,
PM_RET_ERROR_NOTSUPPORTED = 4,
- PM_RET_ERROR_NOFEATURE = 19,
+ PM_RET_ERROR_IOCTL_NOT_SUPPORTED = 19,
PM_RET_ERROR_INVALID_CRC = 301,
PM_RET_ERROR_NOT_ENABLED = 29,
PM_RET_ERROR_INTERNAL = 2000,
diff --git a/plat/xilinx/versal_net/plat_psci.c b/plat/xilinx/versal_net/plat_psci.c
index fcb32b9..399500d 100644
--- a/plat/xilinx/versal_net/plat_psci.c
+++ b/plat/xilinx/versal_net/plat_psci.c
@@ -1,7 +1,7 @@
/*
* Copyright (c) 2018-2020, Arm Limited and Contributors. All rights reserved.
* Copyright (c) 2021-2022, Xilinx, Inc. All rights reserved.
- * Copyright (c) 2022-2023, Advanced Micro Devices, Inc. All rights reserved.
+ * Copyright (c) 2022-2025, Advanced Micro Devices, Inc. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -19,8 +19,6 @@
#include <plat_private.h>
#include <pm_defs.h>
-#define PM_RET_ERROR_NOFEATURE U(19)
-
static uintptr_t versal_net_sec_entry;
static void zynqmp_cpu_standby(plat_local_state_t cpu_state)
@@ -175,7 +173,7 @@
mmio_write_32(SLCR_OSPI_QSPI_IOU_AXI_MUX_SEL, arg1);
return 0;
}
- return PM_RET_ERROR_NOFEATURE;
+ return PM_RET_ERROR_IOCTL_NOT_SUPPORTED;
}
static uint64_t no_pm_handler(uint32_t smc_fid, uint64_t x1, uint64_t x2, uint64_t x3,