mmc: mmc_spi: remove unnecessary check in mmc_spi_setup_data_message()
PATCH 1/1 mmc: mmc_spi: remove unnecessary check in mmc_spi_setup_data_message()
An earlier commit changed the outer if statement from
"if (multiple || write) {" to "if (write) {" so now we know that "write" is true and no longer need to check. Delete the unnecessary check.
Signed-off-by Dan Carpenter <[email protected]>
--- drivers/mmc/host/mmc_spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/host/mmc_spi.c +1 -1
@@ -566,7 +566,7 @@ mmc_spi_setup_data_message(struct mmc_spi_host *host, bool multiple, bool write)if (write) { t = &host->early_status;memset (t,0 ,sizeof (*t)); - t->len = write ?sizeof (scratch->status) :1 ; + t->len =sizeof (scratch->status); t->tx_buf = host->ones; t->rx_buf = scratch->status; t->cs_change =1 ;
Signature · 1 line
2.47.2
Quoted 6 lines · Dan Carpenter
An earlier commit changed the outer if statement from
"if (multiple || write) {" to "if (write) {" so now we know that "write" is true and no longer need to check. Delete the unnecessary check.Signed-off-by Dan Carpenter <[email protected]>
Applied for next, thanks!
Kind regards
Uffe
Quoted 20 lines
--- drivers/mmc/host/mmc_spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/mmc/host/mmc_spi.c +1
-2@@ -566,7 +566,7 @@ mmc_spi_setup_data_message(struct mmc_spi_host *host, bool multiple, bool write)if (write) { t = &host->early_status;memset (t,0 ,sizeof (*t)); - t->len = write ?sizeof (scratch->status) :1 ; + t->len =sizeof (scratch->status); t->tx_buf = host->ones; t->rx_buf = scratch->status; t->cs_change =1 ; --2.47.2