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

View file

@ -340,12 +340,15 @@ void pm_client_suspend(const struct pm_proc *proc, uint32_t state)
*/
static uint32_t pm_get_cpuid(uint32_t nid)
{
uint32_t ret = UNDEFINED_CPUID;
for (size_t i = 0; 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;
}
/**