From 9f5ac599801c0f7c0969fa94c638265ed988b9bc Mon Sep 17 00:00:00 2001 From: Fabrizio Castro Date: Sat, 15 Jul 2023 02:04:02 +0100 Subject: [PATCH] spi: rzv2m-csi: Replace unnecessary ternary operators The ternary operators used to initialize tx_completed and rx_completed are not necessary, replace them with a better implementation. Signed-off-by: Fabrizio Castro Reviewed-by: Geert Uytterhoeven Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230715010407.1751715-6-fabrizio.castro.jz@renesas.com Signed-off-by: Mark Brown --- drivers/spi/spi-rzv2m-csi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/spi/spi-rzv2m-csi.c b/drivers/spi/spi-rzv2m-csi.c index 1c65cd5f2039..038f1486b7d7 100644 --- a/drivers/spi/spi-rzv2m-csi.c +++ b/drivers/spi/spi-rzv2m-csi.c @@ -439,8 +439,8 @@ static int rzv2m_csi_setup(struct spi_device *spi) static int rzv2m_csi_pio_transfer(struct rzv2m_csi_priv *csi) { - bool tx_completed = csi->txbuf ? false : true; - bool rx_completed = csi->rxbuf ? false : true; + bool tx_completed = !csi->txbuf; + bool rx_completed = !csi->rxbuf; int ret = 0; /* Make sure the TX FIFO is empty */