fix(versal): 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: I41b08349fc6023458ffc6e126f58293a9ef37422
Signed-off-by: Maheedhar Bollapalli <maheedharsai.bollapalli@amd.com>
This commit is contained in:
Maheedhar Bollapalli 2024-10-21 11:10:28 +00:00
parent 7d15b94ba3
commit 9b89de5fc4

View file

@ -232,12 +232,15 @@ void pm_client_abort_suspend(void)
*/
static uint32_t pm_get_cpuid(uint32_t nid)
{
uint32_t ret = UNDEFINED_CPUID;
for (size_t i = 0U; i < ARRAY_SIZE(pm_procs_all); i++) {
if (pm_procs_all[i].node_id == nid) {
return i;
ret = i;
break;
}
}
return UNDEFINED_CPUID;
return ret;
}
/**