Linux MultiMedia Card development
 help / color / mirror / Atom feed
* [PATCH] mmc: sdhci-sprd: Fix error code in sdhci_sprd_tuning()
@ 2023-09-07  9:54 Dan Carpenter
  2023-09-08  7:30 ` Chunyan Zhang
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Dan Carpenter @ 2023-09-07  9:54 UTC (permalink / raw)
  To: Wenchao Chen
  Cc: Adrian Hunter, Ulf Hansson, Orson Zhai, Baolin Wang,
	Chunyan Zhang, linux-mmc, kernel-janitors

Return an error code if sdhci_sprd_get_best_clk_sample() fails.
Currently, it returns success.

Fixes: d83d251bf3c2 ("mmc: sdhci-sprd: Add SD HS mode online tuning")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
This is from static analysis and has not been tested.
---
 drivers/mmc/host/sdhci-sprd.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/mmc/host/sdhci-sprd.c b/drivers/mmc/host/sdhci-sprd.c
index 649ae075e229..6b84ba27e6ab 100644
--- a/drivers/mmc/host/sdhci-sprd.c
+++ b/drivers/mmc/host/sdhci-sprd.c
@@ -644,6 +644,7 @@ static int sdhci_sprd_tuning(struct mmc_host *mmc, struct mmc_card *card,
 	best_clk_sample = sdhci_sprd_get_best_clk_sample(mmc, value);
 	if (best_clk_sample < 0) {
 		dev_err(mmc_dev(host->mmc), "all tuning phase fail!\n");
+		err = best_clk_sample;
 		goto out;
 	}
 
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] mmc: sdhci-sprd: Fix error code in sdhci_sprd_tuning()
  2023-09-07  9:54 [PATCH] mmc: sdhci-sprd: Fix error code in sdhci_sprd_tuning() Dan Carpenter
@ 2023-09-08  7:30 ` Chunyan Zhang
  2023-09-08  8:37   ` Wenchao Chen
  2023-09-12  1:16 ` Baolin Wang
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 6+ messages in thread
From: Chunyan Zhang @ 2023-09-08  7:30 UTC (permalink / raw)
  To: Dan Carpenter, wenchao.chen666@gmail.com
  Cc: Wenchao Chen, Adrian Hunter, Ulf Hansson, Orson Zhai, Baolin Wang,
	linux-mmc, kernel-janitors

+ Wenchao's gmail

On Thu, 7 Sept 2023 at 17:54, Dan Carpenter <dan.carpenter@linaro.org> wrote:
>
> Return an error code if sdhci_sprd_get_best_clk_sample() fails.
> Currently, it returns success.
>
> Fixes: d83d251bf3c2 ("mmc: sdhci-sprd: Add SD HS mode online tuning")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
> ---
> This is from static analysis and has not been tested.
> ---
>  drivers/mmc/host/sdhci-sprd.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/mmc/host/sdhci-sprd.c b/drivers/mmc/host/sdhci-sprd.c
> index 649ae075e229..6b84ba27e6ab 100644
> --- a/drivers/mmc/host/sdhci-sprd.c
> +++ b/drivers/mmc/host/sdhci-sprd.c
> @@ -644,6 +644,7 @@ static int sdhci_sprd_tuning(struct mmc_host *mmc, struct mmc_card *card,
>         best_clk_sample = sdhci_sprd_get_best_clk_sample(mmc, value);
>         if (best_clk_sample < 0) {
>                 dev_err(mmc_dev(host->mmc), "all tuning phase fail!\n");
> +               err = best_clk_sample;
>                 goto out;
>         }
>
> --
> 2.39.2
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] mmc: sdhci-sprd: Fix error code in sdhci_sprd_tuning()
  2023-09-08  7:30 ` Chunyan Zhang
@ 2023-09-08  8:37   ` Wenchao Chen
  0 siblings, 0 replies; 6+ messages in thread
From: Wenchao Chen @ 2023-09-08  8:37 UTC (permalink / raw)
  To: Chunyan Zhang
  Cc: Dan Carpenter, Wenchao Chen, Adrian Hunter, Ulf Hansson,
	Orson Zhai, Baolin Wang, linux-mmc, kernel-janitors

On Fri, 8 Sept 2023 at 15:31, Chunyan Zhang <zhang.lyra@gmail.com> wrote:
>
> + Wenchao's gmail
>
> On Thu, 7 Sept 2023 at 17:54, Dan Carpenter <dan.carpenter@linaro.org> wrote:
> >
> > Return an error code if sdhci_sprd_get_best_clk_sample() fails.
> > Currently, it returns success.
> >
> > Fixes: d83d251bf3c2 ("mmc: sdhci-sprd: Add SD HS mode online tuning")
> > Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
> > ---

Reviewed-by: Wenchao Chen <wenchao.chen@unisoc.com>

Thanks,
Wenchao

> > This is from static analysis and has not been tested.
> > ---
> >  drivers/mmc/host/sdhci-sprd.c | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/mmc/host/sdhci-sprd.c b/drivers/mmc/host/sdhci-sprd.c
> > index 649ae075e229..6b84ba27e6ab 100644
> > --- a/drivers/mmc/host/sdhci-sprd.c
> > +++ b/drivers/mmc/host/sdhci-sprd.c
> > @@ -644,6 +644,7 @@ static int sdhci_sprd_tuning(struct mmc_host *mmc, struct mmc_card *card,
> >         best_clk_sample = sdhci_sprd_get_best_clk_sample(mmc, value);
> >         if (best_clk_sample < 0) {
> >                 dev_err(mmc_dev(host->mmc), "all tuning phase fail!\n");
> > +               err = best_clk_sample;
> >                 goto out;
> >         }
> >
> > --
> > 2.39.2
> >

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] mmc: sdhci-sprd: Fix error code in sdhci_sprd_tuning()
  2023-09-07  9:54 [PATCH] mmc: sdhci-sprd: Fix error code in sdhci_sprd_tuning() Dan Carpenter
  2023-09-08  7:30 ` Chunyan Zhang
@ 2023-09-12  1:16 ` Baolin Wang
  2023-09-12  9:41 ` Adrian Hunter
  2023-09-14 14:47 ` Ulf Hansson
  3 siblings, 0 replies; 6+ messages in thread
From: Baolin Wang @ 2023-09-12  1:16 UTC (permalink / raw)
  To: Dan Carpenter, Wenchao Chen
  Cc: Adrian Hunter, Ulf Hansson, Orson Zhai, Chunyan Zhang, linux-mmc,
	kernel-janitors



On 9/7/2023 5:54 PM, Dan Carpenter wrote:
> Return an error code if sdhci_sprd_get_best_clk_sample() fails.
> Currently, it returns success.
> 
> Fixes: d83d251bf3c2 ("mmc: sdhci-sprd: Add SD HS mode online tuning")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>

Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com>

> ---
> This is from static analysis and has not been tested.
> ---
>   drivers/mmc/host/sdhci-sprd.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/mmc/host/sdhci-sprd.c b/drivers/mmc/host/sdhci-sprd.c
> index 649ae075e229..6b84ba27e6ab 100644
> --- a/drivers/mmc/host/sdhci-sprd.c
> +++ b/drivers/mmc/host/sdhci-sprd.c
> @@ -644,6 +644,7 @@ static int sdhci_sprd_tuning(struct mmc_host *mmc, struct mmc_card *card,
>   	best_clk_sample = sdhci_sprd_get_best_clk_sample(mmc, value);
>   	if (best_clk_sample < 0) {
>   		dev_err(mmc_dev(host->mmc), "all tuning phase fail!\n");
> +		err = best_clk_sample;
>   		goto out;
>   	}
>   

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] mmc: sdhci-sprd: Fix error code in sdhci_sprd_tuning()
  2023-09-07  9:54 [PATCH] mmc: sdhci-sprd: Fix error code in sdhci_sprd_tuning() Dan Carpenter
  2023-09-08  7:30 ` Chunyan Zhang
  2023-09-12  1:16 ` Baolin Wang
@ 2023-09-12  9:41 ` Adrian Hunter
  2023-09-14 14:47 ` Ulf Hansson
  3 siblings, 0 replies; 6+ messages in thread
From: Adrian Hunter @ 2023-09-12  9:41 UTC (permalink / raw)
  To: Dan Carpenter, Wenchao Chen
  Cc: Ulf Hansson, Orson Zhai, Baolin Wang, Chunyan Zhang, linux-mmc,
	kernel-janitors

On 7/09/23 12:54, Dan Carpenter wrote:
> Return an error code if sdhci_sprd_get_best_clk_sample() fails.
> Currently, it returns success.
> 
> Fixes: d83d251bf3c2 ("mmc: sdhci-sprd: Add SD HS mode online tuning")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
> ---
> This is from static analysis and has not been tested.
> ---
>  drivers/mmc/host/sdhci-sprd.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/mmc/host/sdhci-sprd.c b/drivers/mmc/host/sdhci-sprd.c
> index 649ae075e229..6b84ba27e6ab 100644
> --- a/drivers/mmc/host/sdhci-sprd.c
> +++ b/drivers/mmc/host/sdhci-sprd.c
> @@ -644,6 +644,7 @@ static int sdhci_sprd_tuning(struct mmc_host *mmc, struct mmc_card *card,
>  	best_clk_sample = sdhci_sprd_get_best_clk_sample(mmc, value);
>  	if (best_clk_sample < 0) {
>  		dev_err(mmc_dev(host->mmc), "all tuning phase fail!\n");
> +		err = best_clk_sample;
>  		goto out;
>  	}
>  

Acked-by: Adrian Hunter <adrian.hunter@intel.com>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] mmc: sdhci-sprd: Fix error code in sdhci_sprd_tuning()
  2023-09-07  9:54 [PATCH] mmc: sdhci-sprd: Fix error code in sdhci_sprd_tuning() Dan Carpenter
                   ` (2 preceding siblings ...)
  2023-09-12  9:41 ` Adrian Hunter
@ 2023-09-14 14:47 ` Ulf Hansson
  3 siblings, 0 replies; 6+ messages in thread
From: Ulf Hansson @ 2023-09-14 14:47 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Wenchao Chen, Adrian Hunter, Orson Zhai, Baolin Wang,
	Chunyan Zhang, linux-mmc, kernel-janitors

On Thu, 7 Sept 2023 at 11:54, Dan Carpenter <dan.carpenter@linaro.org> wrote:
>
> Return an error code if sdhci_sprd_get_best_clk_sample() fails.
> Currently, it returns success.
>
> Fixes: d83d251bf3c2 ("mmc: sdhci-sprd: Add SD HS mode online tuning")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>

Applied for fixes, thanks!

Kind regards
Uffe


> ---
> This is from static analysis and has not been tested.
> ---
>  drivers/mmc/host/sdhci-sprd.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/mmc/host/sdhci-sprd.c b/drivers/mmc/host/sdhci-sprd.c
> index 649ae075e229..6b84ba27e6ab 100644
> --- a/drivers/mmc/host/sdhci-sprd.c
> +++ b/drivers/mmc/host/sdhci-sprd.c
> @@ -644,6 +644,7 @@ static int sdhci_sprd_tuning(struct mmc_host *mmc, struct mmc_card *card,
>         best_clk_sample = sdhci_sprd_get_best_clk_sample(mmc, value);
>         if (best_clk_sample < 0) {
>                 dev_err(mmc_dev(host->mmc), "all tuning phase fail!\n");
> +               err = best_clk_sample;
>                 goto out;
>         }
>
> --
> 2.39.2
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-09-14 14:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-07  9:54 [PATCH] mmc: sdhci-sprd: Fix error code in sdhci_sprd_tuning() Dan Carpenter
2023-09-08  7:30 ` Chunyan Zhang
2023-09-08  8:37   ` Wenchao Chen
2023-09-12  1:16 ` Baolin Wang
2023-09-12  9:41 ` Adrian Hunter
2023-09-14 14:47 ` Ulf Hansson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox