]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
ram: k3-ddrss: Use logical and not bitwise
authorAndrew Goodbody <andrew.goodbody@linaro.org>
Fri, 8 Aug 2025 10:47:43 +0000 (11:47 +0100)
committerTom Rini <trini@konsulko.com>
Fri, 15 Aug 2025 20:17:30 +0000 (14:17 -0600)
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@linaro.org>
drivers/ram/k3-ddrss/k3-ddrss.c

index 6590d57ad84f3c4dc5c72c6c5889038c463b0469..b86e2448eb574f92423e7b67727d9fb5b090610c 100644 (file)
@@ -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;