Re: [PATCH v2 3/4] mmc: dw_mmc: Convert to mmc_send_tuning()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 23 December 2014 at 10:49, Jaehoon Chung <jh80.chung@xxxxxxxxxxx> wrote:
> Hi. Ulf.
>
> Your patch has bug..
> If last sample value is failed, then it's returned with error.
>
> I will recommend this. how about?
>
>  drivers/mmc/host/dw_mmc-exynos.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/mmc/host/dw_mmc-exynos.c b/drivers/mmc/host/dw_mmc-exynos.c
> index d0d7aec..d6b8846 100644
> --- a/drivers/mmc/host/dw_mmc-exynos.c
> +++ b/drivers/mmc/host/dw_mmc-exynos.c
> @@ -381,7 +381,7 @@ static int dw_mci_exynos_execute_tuning(struct dw_mci_slot *slot)
>         struct mmc_host *mmc = slot->mmc;
>         u8 start_smpl, smpl, candiates = 0;
>         s8 found = -1;
> -       int ret = 0;
> +       int ret = 0, success;
>
>         start_smpl = dw_mci_exynos_get_clksmpl(host);
>
> @@ -389,8 +389,8 @@ static int dw_mci_exynos_execute_tuning(struct dw_mci_slot *slot)
>                 mci_writel(host, TMOUT, ~0);
>                 smpl = dw_mci_exynos_move_next_clksmpl(host);
>
> -               ret = mmc_send_tuning(mmc);
> -               if (!ret)
> +               success = mmc_send_tuning(mmc);
> +               if (!success)
>                         candiates |= (1 << smpl);
>
>         } while (start_smpl != smpl);
> --
> 1.9.1
>

Urgh! Thanks a lot for spotting this Jaehoon! I will update my patch
according to your proposal. Sorry for all the noise I caused around
this.

Kind regards
Uffe
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux