fix(arm-drivers): typecast expressions to match data type

This corrects the MISRA violation C2012-10.4:
Both operands of an operator in which the usual arithmetic conversions
are performed shall have the same essential type category.
The condition is explicitly checked against 0U, appending 'U' and
typecasting for unsigned comparison.

Change-Id: I1500e2b3628313e68f94bce701a057b80bc2f933
Signed-off-by: Nithin G <nithing@amd.com>
Signed-off-by: Maheedhar Bollapalli <maheedharsai.bollapalli@amd.com>
This commit is contained in:
Nithin G 2024-04-23 17:38:25 +05:30 committed by Maheedhar Bollapalli
parent bec4a2c9c3
commit edecc70331

View file

@ -143,7 +143,7 @@ void cci_enable_snoop_dvm_reqs(unsigned int master_id)
* rest of bits are write ignore
*/
mmio_write_32(cci_base +
SLAVE_IFACE_OFFSET(slave_if_id) + SNOOP_CTRL_REG,
SLAVE_IFACE_OFFSET((u_register_t)slave_if_id) + SNOOP_CTRL_REG,
DVM_EN_BIT | SNOOP_EN_BIT);
/*
@ -171,7 +171,7 @@ void cci_disable_snoop_dvm_reqs(unsigned int master_id)
* rest of bits are write ignore.
*/
mmio_write_32(cci_base +
SLAVE_IFACE_OFFSET(slave_if_id) + SNOOP_CTRL_REG,
SLAVE_IFACE_OFFSET((u_register_t)slave_if_id) + SNOOP_CTRL_REG,
~(DVM_EN_BIT | SNOOP_EN_BIT));
/*