mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] i3c: master: adi: fix number of bytes written to fifo
@ 2025-09-24 19:56 alexandre.belloni
  2025-09-25  4:01 ` Frank Li
  2025-09-25  7:20 ` Jorge Marques
  0 siblings, 2 replies; 3+ messages in thread
From: alexandre.belloni @ 2025-09-24 19:56 UTC (permalink / raw)
  To: Jorge Marques, Alexandre Belloni, Frank Li
  Cc: kernel test robot, linux-i3c, linux-kernel

From: Alexandre Belloni <alexandre.belloni@bootlin.com>

adi_i3c_master_wr_to_tx_fifo computes the maximum number of bytes that can be
sent to the fifo but never makes use of it, actually limit the number of bytes
sent.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202509190505.fKGvEJRa-lkp@intel.com/
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
---
 drivers/i3c/master/adi-i3c-master.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/i3c/master/adi-i3c-master.c b/drivers/i3c/master/adi-i3c-master.c
index 18597ba1f1c3..82ac0b3d057a 100644
--- a/drivers/i3c/master/adi-i3c-master.c
+++ b/drivers/i3c/master/adi-i3c-master.c
@@ -135,7 +135,7 @@ static void adi_i3c_master_wr_to_tx_fifo(struct adi_i3c_master *master,
 
 	n = readl(master->regs + REG_SDO_FIFO_ROOM);
 	m = min(n, nbytes);
-	i3c_writel_fifo(master->regs + REG_SDO_FIFO, buf, nbytes);
+	i3c_writel_fifo(master->regs + REG_SDO_FIFO, buf, m);
 }
 
 static void adi_i3c_master_rd_from_rx_fifo(struct adi_i3c_master *master,
-- 
2.51.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-09-25  7:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-24 19:56 [PATCH] i3c: master: adi: fix number of bytes written to fifo alexandre.belloni
2025-09-25  4:01 ` Frank Li
2025-09-25  7:20 ` Jorge Marques

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®