[PATCH] ram: k3-ddrss: Use logical and not bitwise

Andrew Goodbody andrew.goodbody at linaro.org
Fri Aug 8 12:47:43 CEST 2025


The test for the interrupt LPDDR4_INTR_BIST_DONE is using a bitwise and
but the test is simple logic so use the more appropriate logical and.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody at linaro.org>
---
 drivers/ram/k3-ddrss/k3-ddrss.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/ram/k3-ddrss/k3-ddrss.c b/drivers/ram/k3-ddrss/k3-ddrss.c
index 6590d57ad84..b86e2448eb5 100644
--- a/drivers/ram/k3-ddrss/k3-ddrss.c
+++ b/drivers/ram/k3-ddrss/k3-ddrss.c
@@ -626,7 +626,7 @@ static void k3_lpddr4_bist_init_mem_region(struct k3_ddrss_desc *ddrss,
 	while (i < BIST_MEM_INIT_TIMEOUT) {
 		status = driverdt->checkctlinterrupt(pd, LPDDR4_INTR_BIST_DONE,
 						     &int_status);
-		if (!status & int_status) {
+		if (!status && int_status) {
 			/* Clear LPDDR4_INTR_BIST_DONE */
 			driverdt->ackctlinterrupt(pd, LPDDR4_INTR_BIST_DONE);
 			break;

---
base-commit: 123cd77122a13288e1552b5d9b7c22a6f19e2e02
change-id: 20250808-ram_k3-ddrss-c1bafd8b7415

Best regards,
-- 
Andrew Goodbody <andrew.goodbody at linaro.org>



More information about the U-Boot mailing list