]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
i3c: mipi-i3c-hci: Move unexpected INTR_STATUS print before IO handler
authorJarkko Nikula <jarkko.nikula@linux.intel.com>
Wed, 9 Apr 2025 14:04:01 +0000 (17:04 +0300)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Thu, 15 May 2025 09:41:13 +0000 (11:41 +0200)
Move "unexpected INTR_STATUS" error print before calling the IO handler
as it is more consistent that way. Otherwise it may be confusing if
generic interrupt related prints are mixed with IO handler prints.

Since this error print is more indication of missing code rather than
runtime error downgrade it to dev_warn_once().

Reviewed-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Link: https://lore.kernel.org/r/20250409140401.299251-5-jarkko.nikula@linux.intel.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/i3c/master/mipi-i3c-hci/core.c

index 0bb74173ca9400ed9eb702f5fbb05cf9ea5aa659..bc453869454082b5340f5f20a094baadd4398f74 100644 (file)
@@ -606,12 +606,13 @@ static irqreturn_t i3c_hci_irq_handler(int irq, void *dev_id)
                val &= ~INTR_HC_INTERNAL_ERR;
        }
 
+       if (val)
+               dev_warn_once(&hci->master.dev,
+                             "unexpected INTR_STATUS %#x\n", val);
+
        if (hci->io->irq_handler(hci))
                result = IRQ_HANDLED;
 
-       if (val)
-               dev_err(&hci->master.dev, "unexpected INTR_STATUS %#x\n", val);
-
        return result;
 }