From: Marc Kleine-Budde Date: Thu, 19 Mar 2026 16:55:44 +0000 (+0100) Subject: spi: spi-fsl-lpspi: fsl_lpspi_write_tx_fifo(): simplify while() loop check X-Git-Url: http://git.ipfire.org/index.cgi?a=commitdiff_plain;h=4ef7fa7bca5728a3f61c28da73d7714ed1f303a6;p=thirdparty%2Fkernel%2Flinux.git spi: spi-fsl-lpspi: fsl_lpspi_write_tx_fifo(): simplify while() loop check To simplify the loop check. Combine both conditions of the while() and the directly following if() into the while(). Signed-off-by: Marc Kleine-Budde Link: https://patch.msgid.link/20260319-spi-fsl-lpspi-cleanups-v2-10-02b56c5d44a8@pengutronix.de Signed-off-by: Mark Brown --- diff --git a/drivers/spi/spi-fsl-lpspi.c b/drivers/spi/spi-fsl-lpspi.c index 7bc14e56daccc..3771fed7ea3f7 100644 --- a/drivers/spi/spi-fsl-lpspi.c +++ b/drivers/spi/spi-fsl-lpspi.c @@ -262,9 +262,7 @@ static void fsl_lpspi_write_tx_fifo(struct fsl_lpspi_data *fsl_lpspi) txfifo_cnt = readl(fsl_lpspi->base + IMX7ULP_FSR) & 0xff; - while (txfifo_cnt < fsl_lpspi->txfifosize) { - if (!fsl_lpspi->remain) - break; + while (txfifo_cnt < fsl_lpspi->txfifosize && fsl_lpspi->remain) { fsl_lpspi->tx(fsl_lpspi); txfifo_cnt++; }