From edecc70331ec5e7583972f66f0e8dc6cf039c686 Mon Sep 17 00:00:00 2001 From: Nithin G Date: Tue, 23 Apr 2024 17:38:25 +0530 Subject: [PATCH] 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 Signed-off-by: Maheedhar Bollapalli --- drivers/arm/cci/cci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/arm/cci/cci.c b/drivers/arm/cci/cci.c index 40d2efdeb..ae2b9bb04 100644 --- a/drivers/arm/cci/cci.c +++ b/drivers/arm/cci/cci.c @@ -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)); /*