fix(versal): resolve misra 10.1 warnings
MISRA Violation: MISRA-C: 2012 R.10.1
-The operand to the operator does not have an essentially
unsigned type.
Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@xilinx.com>
Change-Id: I4873a620086dfd6f636fe730165a9d13a29e9652
diff --git a/plat/xilinx/versal/pm_service/pm_svc_main.c b/plat/xilinx/versal/pm_service/pm_svc_main.c
index 6c34229..382a148 100644
--- a/plat/xilinx/versal/pm_service/pm_svc_main.c
+++ b/plat/xilinx/versal/pm_service/pm_svc_main.c
@@ -297,13 +297,13 @@
if ((pm_arg[0] == XPM_QID_CLOCK_GET_NAME ||
pm_arg[0] == XPM_QID_PINCTRL_GET_FUNCTION_NAME) &&
ret == PM_RET_SUCCESS) {
- SMC_RET2(handle, (uint64_t)buf[0] | ((uint64_t)buf[1] << 32),
- (uint64_t)buf[2] | ((uint64_t)buf[3] << 32));
+ SMC_RET2(handle, (uint64_t)buf[0] | ((uint64_t)buf[1] << 32U),
+ (uint64_t)buf[2] | ((uint64_t)buf[3] << 32U));
}
}
- SMC_RET2(handle, (uint64_t)ret | ((uint64_t)buf[0] << 32),
- (uint64_t)buf[1] | ((uint64_t)buf[2] << 32));
+ SMC_RET2(handle, (uint64_t)ret | ((uint64_t)buf[0] << 32U),
+ (uint64_t)buf[1] | ((uint64_t)buf[2] << 32U));
}
/**
@@ -345,9 +345,9 @@
}
pm_arg[0] = (uint32_t)x1;
- pm_arg[1] = (uint32_t)(x1 >> 32);
+ pm_arg[1] = (uint32_t)(x1 >> 32U);
pm_arg[2] = (uint32_t)x2;
- pm_arg[3] = (uint32_t)(x2 >> 32);
+ pm_arg[3] = (uint32_t)(x2 >> 32U);
pm_arg[4] = (uint32_t)x3;
(void)(x4);
api_id = smc_fid & FUNCID_NUM_MASK;