[PATCH spi-next 08/11] spi: spi-fsl-lpspi: fsl_lpspi_write_tx_fifo(): simplify while() loop check
From: Marc Kleine-Budde
Date: Mon Mar 16 2026 - 04:41:45 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 920748795314..ae06bc06f626 100644
--- a/drivers/spi/spi-fsl-lpspi.c
+++ b/drivers/spi/spi-fsl-lpspi.c
@@ -265,9 +265,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.51.0