Message ID | a8af0a08-8405-43cc-bd83-85ff25f572ca@moroto.mountain (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | mmc: sdhci-sprd: Fix error code in sdhci_sprd_tuning() | expand |
+ 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 >
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 > >
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; > } >
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>
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 >
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; }
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(+)