Skip to content

Commit 8a1f3fd

Browse files
i3c: master: adi: fix number of bytes written to fifo
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/ Reviewed-by: Jorge Marques <jorge.marques@analog.com> Reviewed-by: Frank Li <Frank.Li@nxp.com> Link: https://lore.kernel.org/r/20250924195600.122142-1-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
1 parent 6497641 commit 8a1f3fd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/i3c/master/adi-i3c-master.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ static void adi_i3c_master_wr_to_tx_fifo(struct adi_i3c_master *master,
135135

136136
n = readl(master->regs + REG_SDO_FIFO_ROOM);
137137
m = min(n, nbytes);
138-
i3c_writel_fifo(master->regs + REG_SDO_FIFO, buf, nbytes);
138+
i3c_writel_fifo(master->regs + REG_SDO_FIFO, buf, m);
139139
}
140140

141141
static void adi_i3c_master_rd_from_rx_fifo(struct adi_i3c_master *master,

0 commit comments

Comments
 (0)