From dd1fe7178b578916b1e133b7c65c183e1f994371 Mon Sep 17 00:00:00 2001 From: Venkatesh Yadav Abbarapu Date: Wed, 4 May 2022 14:27:56 +0530 Subject: [PATCH] fix(zynqmp): resolve misra R14.4 warnings MISRA Violation: MISRA-C:2012 R.14.4 The controlling expression of an if statement and the controlling expression of an iteration-statement shall have essentially Boolean type. Signed-off-by: Venkatesh Yadav Abbarapu Change-Id: I8f3f6f956d1d58ca201fb5895f12bcaabf2afd3b --- plat/xilinx/zynqmp/aarch64/zynqmp_common.c | 2 +- plat/xilinx/zynqmp/bl31_zynqmp_setup.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plat/xilinx/zynqmp/aarch64/zynqmp_common.c b/plat/xilinx/zynqmp/aarch64/zynqmp_common.c index 4bda4a13a..32b01231f 100644 --- a/plat/xilinx/zynqmp/aarch64/zynqmp_common.c +++ b/plat/xilinx/zynqmp/aarch64/zynqmp_common.c @@ -262,7 +262,7 @@ static char *zynqmp_get_silicon_idcode_name(void) return zynqmp_devices[i].name; } - if (ver & ZYNQMP_PL_STATUS_MASK) { + if ((ver & ZYNQMP_PL_STATUS_MASK) != 0U) { return zynqmp_devices[i].name; } diff --git a/plat/xilinx/zynqmp/bl31_zynqmp_setup.c b/plat/xilinx/zynqmp/bl31_zynqmp_setup.c index 095853f5c..5ad33cc42 100644 --- a/plat/xilinx/zynqmp/bl31_zynqmp_setup.c +++ b/plat/xilinx/zynqmp/bl31_zynqmp_setup.c @@ -121,10 +121,10 @@ void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1, panic(); } } - if (bl32_image_ep_info.pc) { + if (bl32_image_ep_info.pc != 0) { VERBOSE("BL31: Secure code at 0x%lx\n", bl32_image_ep_info.pc); } - if (bl33_image_ep_info.pc) { + if (bl33_image_ep_info.pc != 0) { VERBOSE("BL31: Non secure code at 0x%lx\n", bl33_image_ep_info.pc); } }