[PATCH spi-next v2 10/11] spi: spi-fsl-lpspi: fsl_lpspi_write_tx_fifo(): simplify while() loop check

From: Marc Kleine-Budde

Date: Thu Mar 19 2026 - 13:04:38 EST


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 <mkl@xxxxxxxxxxxxxx>
---
drivers/spi/spi-fsl-lpspi.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/spi/spi-fsl-lpspi.c b/drivers/spi/spi-fsl-lpspi.c
index 9f0d7b9ce2ab..3265618704b0 100644
--- a/drivers/spi/spi-fsl-lpspi.c
+++ b/drivers/spi/spi-fsl-lpspi.c
@@ -267,9 +267,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++;
}

--
2.53.0