diff mbox

[3/3] spi: armada-3700: Remove unnecessary condition

Message ID 20161216093359.GB13942@elgon.mountain (mailing list archive)
State Accepted
Commit 0cc059abac0dc687dc714f3ec2c8d8a134132f56
Headers show

Commit Message

Dan Carpenter Dec. 16, 2016, 9:33 a.m. UTC
We checked that "a3700_spi->wait_mask & cause" was set at the beginning
of the function so we don't need to check again here.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Romain Perier Dec. 16, 2016, 10:30 a.m. UTC | #1
Hello,

Le 16/12/2016 à 10:33, Dan Carpenter a écrit :
> We checked that "a3700_spi->wait_mask & cause" was set at the beginning
> of the function so we don't need to check again here.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/spi/spi-armada-3700.c b/drivers/spi/spi-armada-3700.c
> index 5c7508dc6f0b..e98d464b3ff0 100644
> --- a/drivers/spi/spi-armada-3700.c
> +++ b/drivers/spi/spi-armada-3700.c
> @@ -340,8 +340,7 @@ static irqreturn_t a3700_spi_interrupt(int irq, void *dev_id)
>  	spireg_write(a3700_spi, A3700_SPI_INT_STAT_REG, cause);
>
>  	/* Wake up the transfer */
> -	if (a3700_spi->wait_mask & cause)
> -		complete(&a3700_spi->done);
> +	complete(&a3700_spi->done);
>
>  	return IRQ_HANDLED;
>  }
>


Good catch,

Acked-by: Romain Perier <romain.perier@free-electrons.com>


Thanks,
Romain

--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/spi/spi-armada-3700.c b/drivers/spi/spi-armada-3700.c
index 5c7508dc6f0b..e98d464b3ff0 100644
--- a/drivers/spi/spi-armada-3700.c
+++ b/drivers/spi/spi-armada-3700.c
@@ -340,8 +340,7 @@  static irqreturn_t a3700_spi_interrupt(int irq, void *dev_id)
 	spireg_write(a3700_spi, A3700_SPI_INT_STAT_REG, cause);
 
 	/* Wake up the transfer */
-	if (a3700_spi->wait_mask & cause)
-		complete(&a3700_spi->done);
+	complete(&a3700_spi->done);
 
 	return IRQ_HANDLED;
 }