Message ID | 20250127223654.290904-1-erick.shepherd@ni.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | [RFC,1/2] mmc: Update sdhci tune function to return errors | expand |
On Mon, 27 Jan 2025 at 23:40, Erick Shepherd <erick.shepherd@ni.com> wrote: > > Updates the sdhci_execute_tuning function to return the error code > that was returned by the __sdhci_execute_tuning function. > Previously this code was only stored in host->tuning_err and not > actually returned. > > Signed-off-by: Erick Shepherd <erick.shepherd@ni.com> > --- > drivers/mmc/host/sdhci.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c > index f4a7733a8ad2..b35b8917fa1e 100644 > --- a/drivers/mmc/host/sdhci.c > +++ b/drivers/mmc/host/sdhci.c > @@ -2967,7 +2967,8 @@ int sdhci_execute_tuning(struct mmc_host *mmc, u32 opcode) > > sdhci_start_tuning(host); > > - host->tuning_err = __sdhci_execute_tuning(host, opcode); > + err = __sdhci_execute_tuning(host, opcode); > + host->tuning_err = err; Hmm, this code was deliberately not returning an error in this path, so I am pretty sure things will break with this change. Anyway, please re-submit and add Adrian (the sdhci maintainer) and possibly a couple other contributors that have been working with tunings for host drivers. We need their feedback on this. > > sdhci_end_tuning(host); > out: > -- > 2.43.0 > Kind regards Uffe
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index f4a7733a8ad2..b35b8917fa1e 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -2967,7 +2967,8 @@ int sdhci_execute_tuning(struct mmc_host *mmc, u32 opcode) sdhci_start_tuning(host); - host->tuning_err = __sdhci_execute_tuning(host, opcode); + err = __sdhci_execute_tuning(host, opcode); + host->tuning_err = err; sdhci_end_tuning(host); out:
Updates the sdhci_execute_tuning function to return the error code that was returned by the __sdhci_execute_tuning function. Previously this code was only stored in host->tuning_err and not actually returned. Signed-off-by: Erick Shepherd <erick.shepherd@ni.com> --- drivers/mmc/host/sdhci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)