fix(xilinx): typecast operands to match data type
This corrects the MISRA violation C2012-10.1:
Operands shall not be of an inappropriate essential type.
The condition is explicitly checked against 0U, appending 'U' and
typecasting for unsigned comparison.
Change-Id: I675f1b2ac408b70a9ca307fb5161ebb8e597897c
Signed-off-by: Nithin G <nithing@amd.com>
Signed-off-by: Maheedhar Bollapalli <maheedharsai.bollapalli@amd.com>
diff --git a/plat/xilinx/common/ipi.c b/plat/xilinx/common/ipi.c
index 018a71b..cc4b04d 100644
--- a/plat/xilinx/common/ipi.c
+++ b/plat/xilinx/common/ipi.c
@@ -90,11 +90,11 @@
{
int ret = 0;
- if (!is_ipi_mb_within_range(local, remote)) {
+ if (is_ipi_mb_within_range(local, remote) == 0) {
ret = -EINVAL;
- } else if (IPI_IS_SECURE(local) && !is_secure) {
+ } else if (IPI_IS_SECURE(local) && (is_secure == 0U)) {
ret = -EPERM;
- } else if (IPI_IS_SECURE(remote) && !is_secure) {
+ } else if (IPI_IS_SECURE(remote) && (is_secure == 0U)) {
ret = -EPERM;
} else {
/* To fix the misra 15.7 warning */