mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-16 09:34:18 +00:00
fix(versal-net): typecast expressions to match data type
This corrects the MISRA violation C2012-10.4: Both operands of an operator in which the usual arithmetic conversions are performed shall have the same essential type category. The condition is explicitly checked against 0U, appending 'U' and typecasting for unsigned comparison. Change-Id: I5add78285ff0e48aa6c0fb639e7e2924f5bf9000 Signed-off-by: Maheedhar Bollapalli <maheedharsai.bollapalli@amd.com>
This commit is contained in:
parent
b802b2784c
commit
3cbe0ae5b8
4 changed files with 5 additions and 5 deletions
|
@ -140,7 +140,7 @@ void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
|
|||
SET_PARAM_HEAD(&bl33_image_ep_info, PARAM_EP, VERSION_1, 0);
|
||||
SET_SECURITY_STATE(bl33_image_ep_info.h.attr, NON_SECURE);
|
||||
#if !(TFA_NO_PM)
|
||||
PM_PACK_PAYLOAD4(payload, LOADER_MODULE_ID, 1, PM_LOAD_GET_HANDOFF_PARAMS,
|
||||
PM_PACK_PAYLOAD4(payload, LOADER_MODULE_ID, 1U, PM_LOAD_GET_HANDOFF_PARAMS,
|
||||
(uintptr_t)buff >> 32U, (uintptr_t)buff, max_size);
|
||||
|
||||
ret_status = pm_ipi_send_sync(primary_proc, payload, NULL, 0);
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#include <plat/arm/common/smccc_def.h>
|
||||
#include <plat/common/common_def.h>
|
||||
|
||||
#define MAX_INTR_EL3 2
|
||||
#define MAX_INTR_EL3 2U
|
||||
|
||||
/* List all consoles */
|
||||
#define VERSAL_NET_CONSOLE_ID_none U(0)
|
||||
|
|
|
@ -27,7 +27,7 @@ static uintptr_t versal_net_sec_entry;
|
|||
|
||||
static int32_t versal_net_pwr_domain_on(u_register_t mpidr)
|
||||
{
|
||||
uint32_t cpu_id = plat_core_pos_by_mpidr(mpidr);
|
||||
int32_t cpu_id = plat_core_pos_by_mpidr(mpidr);
|
||||
const struct pm_proc *proc;
|
||||
|
||||
VERBOSE("%s: mpidr: 0x%lx, cpuid: %x\n",
|
||||
|
@ -84,7 +84,7 @@ static void versal_net_pwr_domain_off(const psci_power_state_t *target_state)
|
|||
* be set.
|
||||
*/
|
||||
ret = pm_feature_check((uint32_t)PM_SELF_SUSPEND, &version_type[0], SECURE_FLAG);
|
||||
if (ret == PM_RET_SUCCESS) {
|
||||
if (ret == (uint32_t)PM_RET_SUCCESS) {
|
||||
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,
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#include "pm_client.h"
|
||||
#include <versal_net_def.h>
|
||||
|
||||
#define UNDEFINED_CPUID (~0)
|
||||
#define UNDEFINED_CPUID (~0U)
|
||||
|
||||
DEFINE_RENAME_SYSREG_RW_FUNCS(cpu_pwrctrl_val, S3_0_C15_C2_7)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue