diff mbox

[1/2] mmc: omap_hsmmc: remove a duplicative test

Message ID 20140130121518.GA10368@elgon.mountain (mailing list archive)
State New, archived
Headers show

Commit Message

Dan Carpenter Jan. 30, 2014, 12:15 p.m. UTC
Static checkers complain that testing for both "next" and "!next" is
duplicative.

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

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

Comments

Balaji T K Jan. 30, 2014, 12:59 p.m. UTC | #1
On Thursday 30 January 2014 05:45 PM, Dan Carpenter wrote:
> Static checkers complain that testing for both "next" and "!next" is
> duplicative.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>

Looks good to me
Acked-by: Balaji T K <balajitk@ti.com>

> diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
> index 2a629fbde613..bfb0dbd052c0 100644
> --- a/drivers/mmc/host/omap_hsmmc.c
> +++ b/drivers/mmc/host/omap_hsmmc.c
> @@ -1235,8 +1235,7 @@ static int omap_hsmmc_pre_dma_transfer(struct omap_hsmmc_host *host,
>   	}
>
>   	/* Check if next job is already prepared */
> -	if (next ||
> -	    (!next && data->host_cookie != host->next_data.cookie)) {
> +	if (next || data->host_cookie != host->next_data.cookie) {
>   		dma_len = dma_map_sg(chan->device->dev, data->sg, data->sg_len,
>   				     omap_hsmmc_get_dma_dir(host, data));
>
>

--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" 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/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index 2a629fbde613..bfb0dbd052c0 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -1235,8 +1235,7 @@  static int omap_hsmmc_pre_dma_transfer(struct omap_hsmmc_host *host,
 	}
 
 	/* Check if next job is already prepared */
-	if (next ||
-	    (!next && data->host_cookie != host->next_data.cookie)) {
+	if (next || data->host_cookie != host->next_data.cookie) {
 		dma_len = dma_map_sg(chan->device->dev, data->sg, data->sg_len,
 				     omap_hsmmc_get_dma_dir(host, data));