* [PATCH] mmc: mmc_spi: remove unnecessary check in mmc_spi_setup_data_message()
@ 2025-08-21 12:32 Dan Carpenter
2025-08-22 10:15 ` Ulf Hansson
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2025-08-21 12:32 UTC (permalink / raw)
To: Ulf Hansson
Cc: Bartosz Golaszewski, Rex Chen, Huacai Chen, Binbin Zhou,
linux-mmc, linux-kernel, kernel-janitors
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 <dan.carpenter@linaro.org>
---
drivers/mmc/host/mmc_spi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mmc/host/mmc_spi.c b/drivers/mmc/host/mmc_spi.c
index 95a32ff29ee1..42936e248c55 100644
--- a/drivers/mmc/host/mmc_spi.c
+++ b/drivers/mmc/host/mmc_spi.c
@@ -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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mmc: mmc_spi: remove unnecessary check in mmc_spi_setup_data_message()
2025-08-21 12:32 [PATCH] mmc: mmc_spi: remove unnecessary check in mmc_spi_setup_data_message() Dan Carpenter
@ 2025-08-22 10:15 ` Ulf Hansson
0 siblings, 0 replies; 2+ messages in thread
From: Ulf Hansson @ 2025-08-22 10:15 UTC (permalink / raw)
To: Dan Carpenter
Cc: Bartosz Golaszewski, Rex Chen, Huacai Chen, Binbin Zhou,
linux-mmc, linux-kernel, kernel-janitors
On Thu, 21 Aug 2025 at 14:32, Dan Carpenter <dan.carpenter@linaro.org> wrote:
>
> 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 <dan.carpenter@linaro.org>
Applied for next, thanks!
Kind regards
Uffe
> ---
> drivers/mmc/host/mmc_spi.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/mmc_spi.c b/drivers/mmc/host/mmc_spi.c
> index 95a32ff29ee1..42936e248c55 100644
> --- a/drivers/mmc/host/mmc_spi.c
> +++ b/drivers/mmc/host/mmc_spi.c
> @@ -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
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-08-22 10:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-21 12:32 [PATCH] mmc: mmc_spi: remove unnecessary check in mmc_spi_setup_data_message() Dan Carpenter
2025-08-22 10:15 ` Ulf Hansson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).