public inbox for linux-i3c@lists.infradead.org
 help / color / mirror / Atom feed
From: Jarkko Nikula <jarkko.nikula@linux.intel.com>
To: linux-i3c@lists.infradead.org
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>,
	Frank Li <Frank.Li@nxp.com>,
	Jarkko Nikula <jarkko.nikula@linux.intel.com>
Subject: [PATCH v3 3/5] i3c: mipi-i3c-hci: Clear INTR_STATUS unconditionally
Date: Wed,  9 Apr 2025 17:03:59 +0300	[thread overview]
Message-ID: <20250409140401.299251-3-jarkko.nikula@linux.intel.com> (raw)
In-Reply-To: <20250409140401.299251-1-jarkko.nikula@linux.intel.com>

Status fields in INTR_STATUS register are write 1 to clear so do it
unconditionally and move clearing of them out of an if block.

Suggested-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
---
 drivers/i3c/master/mipi-i3c-hci/core.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/i3c/master/mipi-i3c-hci/core.c b/drivers/i3c/master/mipi-i3c-hci/core.c
index 780e9db7e21e..4c4100d2d9af 100644
--- a/drivers/i3c/master/mipi-i3c-hci/core.c
+++ b/drivers/i3c/master/mipi-i3c-hci/core.c
@@ -590,12 +590,11 @@ static irqreturn_t i3c_hci_irq_handler(int irq, void *dev_id)
 	u32 val;
 
 	val = reg_read(INTR_STATUS);
+	reg_write(INTR_STATUS, val);
 	DBG("INTR_STATUS = %#x", val);
 
-	if (val) {
-		reg_write(INTR_STATUS, val);
+	if (val)
 		result = IRQ_HANDLED;
-	}
 
 	if (val & INTR_HC_RESET_CANCEL) {
 		DBG("cancelled reset");
-- 
2.47.2


-- 
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c

  parent reply	other threads:[~2025-04-09 14:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-09 14:03 [PATCH v3 1/5] i3c: mipi-i3c-hci: Allow only relevant INTR_STATUS bit updates Jarkko Nikula
2025-04-09 14:03 ` [PATCH v3 2/5] i3c: mipi-i3c-hci: Fix handling status of i3c_hci_irq_handler() Jarkko Nikula
2025-04-09 14:03 ` Jarkko Nikula [this message]
2025-04-29  5:33   ` [PATCH v3 3/5] i3c: mipi-i3c-hci: Clear INTR_STATUS unconditionally Frank Li
2025-04-09 14:04 ` [PATCH v3 4/5] i3c: mipi-i3c-hci: Change name of INTR_STATUS bit 11 Jarkko Nikula
2025-04-09 14:04 ` [PATCH v3 5/5] i3c: mipi-i3c-hci: Move unexpected INTR_STATUS print before IO handler Jarkko Nikula
2025-04-23  7:37 ` [PATCH v3 1/5] i3c: mipi-i3c-hci: Allow only relevant INTR_STATUS bit updates Jarkko Nikula
2025-04-29  5:31 ` Frank Li
2025-05-15  9:45 ` Alexandre Belloni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250409140401.299251-3-jarkko.nikula@linux.intel.com \
    --to=jarkko.nikula@linux.intel.com \
    --cc=Frank.Li@nxp.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=linux-i3c@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox