[PATCH] i3c: master: adi: fix number of bytes written to fifo

Frank Li Frank.li at nxp.com
Wed Sep 24 21:01:44 PDT 2025


On Wed, Sep 24, 2025 at 09:56:00PM +0200, alexandre.belloni at bootlin.com wrote:
> From: Alexandre Belloni <alexandre.belloni at 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 at intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202509190505.fKGvEJRa-lkp@intel.com/
> Signed-off-by: Alexandre Belloni <alexandre.belloni at bootlin.com>
> ---

Reviewed-by: Frank Li <Frank.Li at nxp.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
>



More information about the linux-i3c mailing list