Message ID | 20250228141802.1344453-4-jarkko.nikula@linux.intel.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | [1/4] i3c: mipi-i3c-hci: Allow only relevant INTR_STATUS bit updates | expand |
On Fri, Feb 28, 2025 at 04:18:02PM +0200, Jarkko Nikula wrote: > 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(). > > Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Reviewed-by: Frank Li <Frank.Li@nxp.com> > --- > drivers/i3c/master/mipi-i3c-hci/core.c | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/drivers/i3c/master/mipi-i3c-hci/core.c b/drivers/i3c/master/mipi-i3c-hci/core.c > index 84c372740020..5c173249c0ac 100644 > --- a/drivers/i3c/master/mipi-i3c-hci/core.c > +++ b/drivers/i3c/master/mipi-i3c-hci/core.c > @@ -607,12 +607,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; > } > > -- > 2.47.2 > > > -- > linux-i3c mailing list > linux-i3c@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-i3c
diff --git a/drivers/i3c/master/mipi-i3c-hci/core.c b/drivers/i3c/master/mipi-i3c-hci/core.c index 84c372740020..5c173249c0ac 100644 --- a/drivers/i3c/master/mipi-i3c-hci/core.c +++ b/drivers/i3c/master/mipi-i3c-hci/core.c @@ -607,12 +607,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; }
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(). Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> --- drivers/i3c/master/mipi-i3c-hci/core.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)