fix(versal): typecast operands to match data type

This corrects the MISRA violation C2012-10.3:
The value of an expression shall not be assigned to an object with a
narrower essential type or of a different essential type category.
The condition is explicitly checked against 0U, appending 'U' and
typecasting for unsigned comparison.

Change-Id: Ie82297e7eb5faa5d45b1a613c59516052e0c5ecb
Signed-off-by: Maheedhar Bollapalli <maheedharsai.bollapalli@amd.com>
This commit is contained in:
Maheedhar Bollapalli 2024-10-23 10:05:48 +00:00
parent d51c8e4c65
commit 8e4d5c6db0

View file

@ -233,8 +233,9 @@ void pm_client_abort_suspend(void)
static uint32_t pm_get_cpuid(uint32_t nid)
{
uint32_t ret = UNDEFINED_CPUID;
uint32_t i;
for (size_t i = 0U; i < ARRAY_SIZE(pm_procs_all); i++) {
for (i = 0U; i < ARRAY_SIZE(pm_procs_all); i++) {
if (pm_procs_all[i].node_id == nid) {
ret = i;
break;