summaryrefslogtreecommitdiff
path: root/drivers/spi
diff options
context:
space:
mode:
authorkernel test robot <lkp@intel.com>2021-07-13 22:10:04 +0300
committerMark Brown <broonie@kernel.org>2021-08-20 15:07:27 +0300
commit7a4697b201a617907e4b440ae34df601d4755bef (patch)
tree3a5df3e7d8cd9817f816d93f2458f5709320dc18 /drivers/spi
parent02cea7039ad52593ee05824c19233366914df9b2 (diff)
downloadlinux-7a4697b201a617907e4b440ae34df601d4755bef.tar.xz
spi: stm32: fix excluded_middle.cocci warnings
drivers/spi/spi-stm32.c:915:23-25: WARNING !A || A && B is equivalent to !A || B Condition !A || A && B is equivalent to !A || B. Generated by: scripts/coccinelle/misc/excluded_middle.cocci Fixes: 7ceb0b8a3ced ("spi: stm32: finalize message either on dma callback or EOT") CC: Alain Volmat <alain.volmat@foss.st.com> Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: kernel test robot <lkp@intel.com> Reviewed-by: Alain Volmat <alain.volmat@foss.st.com> Link: https://lore.kernel.org/r/20210713191004.GA14729@5eb5c2cbef84 Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/spi-stm32.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/spi/spi-stm32.c b/drivers/spi/spi-stm32.c
index 14ca7ea04e47..9bd3fd1652f7 100644
--- a/drivers/spi/spi-stm32.c
+++ b/drivers/spi/spi-stm32.c
@@ -912,8 +912,7 @@ static irqreturn_t stm32h7_spi_irq_thread(int irq, void *dev_id)
if (!spi->cur_usedma && (spi->rx_buf && (spi->rx_len > 0)))
stm32h7_spi_read_rxfifo(spi);
if (!spi->cur_usedma ||
- (spi->cur_usedma && (spi->cur_comm == SPI_SIMPLEX_TX ||
- spi->cur_comm == SPI_3WIRE_TX)))
+ (spi->cur_comm == SPI_SIMPLEX_TX || spi->cur_comm == SPI_3WIRE_TX))
end = true;
}