From 1117a16e0379986ea68581c02fb2fee40937452b Mon Sep 17 00:00:00 2001 From: Venkatesh Yadav Abbarapu Date: Wed, 25 May 2022 15:18:24 +0530 Subject: [PATCH] fix(versal): resolve misra 15.6 warnings MISRA Violation: MISRA-C:2012 R.15.6 - The body of an iteration-statement or a selection-statement shall be a compound statement. Signed-off-by: Venkatesh Yadav Abbarapu Change-Id: Ia1d6fcabd36d18ff2dab6c22579ffafd5211fc1f --- plat/xilinx/versal/pm_service/pm_api_sys.c | 3 ++- plat/xilinx/versal/pm_service/pm_svc_main.c | 12 ++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/plat/xilinx/versal/pm_service/pm_api_sys.c b/plat/xilinx/versal/pm_service/pm_api_sys.c index 60b66e88f..db7804900 100644 --- a/plat/xilinx/versal/pm_service/pm_api_sys.c +++ b/plat/xilinx/versal/pm_service/pm_api_sys.c @@ -93,8 +93,9 @@ enum pm_ret_status pm_handle_eemi_call(uint32_t flag, uint32_t x0, uint32_t x1, module_id = (x0 & MODULE_ID_MASK) >> 8; //default module id is for LIBPM - if (module_id == 0) + if (module_id == 0) { module_id = LIBPM_MODULE_ID; + } PM_PACK_PAYLOAD6(payload, module_id, flag, x0, x1, x2, x3, x4, x5); return pm_ipi_send_sync(primary_proc, payload, (uint32_t *)result, PAYLOAD_ARG_CNT); diff --git a/plat/xilinx/versal/pm_service/pm_svc_main.c b/plat/xilinx/versal/pm_service/pm_svc_main.c index d38e12052..f4d04b823 100644 --- a/plat/xilinx/versal/pm_service/pm_svc_main.c +++ b/plat/xilinx/versal/pm_service/pm_svc_main.c @@ -332,8 +332,9 @@ uint64_t pm_smc_handler(uint32_t smc_fid, uint64_t x1, uint64_t x2, uint64_t x3, uint32_t api_id; /* Handle case where PM wasn't initialized properly */ - if (!pm_up) + if (!pm_up) { SMC_RET1(handle, SMC_UNK); + } /* * Mark BIT24 payload (i.e 1st bit of pm_arg[3] ) as non-secure (1) @@ -352,16 +353,19 @@ uint64_t pm_smc_handler(uint32_t smc_fid, uint64_t x1, uint64_t x2, uint64_t x3, api_id = smc_fid & FUNCID_NUM_MASK; ret = eemi_for_compatibility(api_id, pm_arg, handle, security_flag); - if (ret != (uintptr_t)0) + if (ret != (uintptr_t)0) { return ret; + } ret = eemi_psci_debugfs_handler(api_id, pm_arg, handle, flags); - if (ret != (uintptr_t)0) + if (ret != (uintptr_t)0) { return ret; + } ret = TF_A_specific_handler(api_id, pm_arg, handle, security_flag); - if (ret != (uintptr_t)0) + if (ret != (uintptr_t)0) { return ret; + } ret = eemi_handler(api_id, pm_arg, handle, security_flag); -- 2.39.5