Skip to contentSkip to conversation

mmc: omap_hsmmc: remove a duplicative test

PATCH In review Dan Carpenter 2 participants 2 messages Jan 30, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 mmc: omap_hsmmc: remove a duplicative test

Static checkers complain that testing for both "next" and "!next" is duplicative.

drivers/mmc/host/omap_hsmmc.c +1 -2
index 2a629fbde613..bfb0dbd052c0 100644
@@ -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));
 
Acked-by on v1 1/2
#1 lore raw
Quoted 5 lines · Dan Carpenter

Static checkers complain that testing for both "next" and "!next" is duplicative.

Looks good to me

Quoted 15 lines
drivers/mmc/host/omap_hsmmc.c +1 -2
index 2a629fbde613..bfb0dbd052c0 100644
@@ -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));