From: Ulf Hansson <ulf.hansson@linaro.org>
To: Jaehoon Chung <jh80.chung@samsung.com>
Cc: Alim Akhtar <alim.akhtar@gmail.com>,
"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
Chris Ball <chris@printf.net>,
Seungwon Jeon <tgih.jun@samsung.com>,
Shawn Guo <shawn.guo@linaro.org>,
Sascha Hauer <kernel@pengutronix.de>,
Aisheng Dong <b29396@freescale.com>,
Stephen Boyd <sboyd@codeaurora.org>,
Minda Chen <Minda.Chen@csr.com>, Barry Song <Baohua.Song@csr.com>
Subject: Re: [PATCH v2 3/4] mmc: dw_mmc: Convert to mmc_send_tuning()
Date: Tue, 23 Dec 2014 11:21:54 +0100 [thread overview]
Message-ID: <CAPDyKFrue1WWDTRMNmxYU=FLC9Cg6ppMX+o0hriK9RKmoRe4mg@mail.gmail.com> (raw)
In-Reply-To: <54993A96.3070505@samsung.com>
On 23 December 2014 at 10:49, Jaehoon Chung <jh80.chung@samsung.com> 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
next prev parent reply other threads:[~2014-12-23 10:21 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-05 11:59 [PATCH v2 0/4] mmc: Convert host drivers to mmc_send_tuning() Ulf Hansson
2014-12-05 11:59 ` [PATCH v2 1/4] mmc: sdhci-esdhc-imx: Convert " Ulf Hansson
2014-12-05 11:59 ` [PATCH v2 2/4] mmc: sdhci-msm: " Ulf Hansson
2014-12-05 16:29 ` Georgi Djakov
2014-12-05 18:13 ` Stephen Boyd
2014-12-05 11:59 ` [PATCH v2 3/4] mmc: dw_mmc: " Ulf Hansson
2014-12-06 12:43 ` Alim Akhtar
2014-12-08 10:10 ` Ulf Hansson
2014-12-09 21:30 ` Alim Akhtar
2014-12-12 15:13 ` Jaehoon Chung
2014-12-15 4:48 ` Jaehoon Chung
2014-12-20 13:34 ` Alim Akhtar
2014-12-22 4:05 ` Jaehoon Chung
2014-12-20 13:18 ` Alim Akhtar
2014-12-22 14:41 ` Ulf Hansson
2014-12-23 9:49 ` Jaehoon Chung
2014-12-23 9:53 ` Jaehoon Chung
2014-12-23 10:21 ` Ulf Hansson [this message]
2014-12-24 1:43 ` Jaehoon Chung
2014-12-24 14:07 ` Alim Akhtar
2014-12-05 11:59 ` [PATCH v2 4/4] mmc: core: Make tuning block patterns static Ulf Hansson
2014-12-05 18:12 ` Stephen Boyd
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAPDyKFrue1WWDTRMNmxYU=FLC9Cg6ppMX+o0hriK9RKmoRe4mg@mail.gmail.com' \
--to=ulf.hansson@linaro.org \
--cc=Baohua.Song@csr.com \
--cc=Minda.Chen@csr.com \
--cc=alim.akhtar@gmail.com \
--cc=b29396@freescale.com \
--cc=chris@printf.net \
--cc=jh80.chung@samsung.com \
--cc=kernel@pengutronix.de \
--cc=linux-mmc@vger.kernel.org \
--cc=sboyd@codeaurora.org \
--cc=shawn.guo@linaro.org \
--cc=tgih.jun@samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).