Skip to content

Commit 7a4697b

Browse files
intel-lab-lkpbroonie
authored andcommitted
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: 7ceb0b8 ("spi: stm32: finalize message either on dma callback or EOT") CC: Alain Volmat <[email protected]> Reported-by: kernel test robot <[email protected]> Signed-off-by: kernel test robot <[email protected]> Reviewed-by: Alain Volmat <[email protected]> Link: https://lore.kernel.org/r/20210713191004.GA14729@5eb5c2cbef84 Signed-off-by: Mark Brown <[email protected]>
1 parent 02cea70 commit 7a4697b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/spi/spi-stm32.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -912,8 +912,7 @@ static irqreturn_t stm32h7_spi_irq_thread(int irq, void *dev_id)
912912
if (!spi->cur_usedma && (spi->rx_buf && (spi->rx_len > 0)))
913913
stm32h7_spi_read_rxfifo(spi);
914914
if (!spi->cur_usedma ||
915-
(spi->cur_usedma && (spi->cur_comm == SPI_SIMPLEX_TX ||
916-
spi->cur_comm == SPI_3WIRE_TX)))
915+
(spi->cur_comm == SPI_SIMPLEX_TX || spi->cur_comm == SPI_3WIRE_TX))
917916
end = true;
918917
}
919918

0 commit comments

Comments
 (0)