From: Wolfram Sang <wsa@the-dreams.de>
To: Simon Horman <horms+renesas@verge.net.au>
Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>,
Ulf Hansson <ulf.hansson@linaro.org>,
Magnus Damm <magnus.damm@gmail.com>,
linux-mmc@vger.kernel.org, linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH v2 1/3] mmc: tmio: correct treatment of errors during tuning
Date: Wed, 7 Feb 2018 22:52:52 +0100 [thread overview]
Message-ID: <20180207215252.dirj5x7ky5bdznmk@ninjato> (raw)
In-Reply-To: <20180119133906.11280-2-horms+renesas@verge.net.au>
[-- Attachment #1: Type: text/plain, Size: 1604 bytes --]
On Fri, Jan 19, 2018 at 02:39:04PM +0100, Simon Horman wrote:
> From: Masaharu Hayakawa <masaharu.hayakawa.ry@renesas.com>
>
> If the return value of mmc_send_tuning() is error other than -EILSEQ, the
> tuning fails and process goes out of for_loop. But the correct processing
> is to judge their TAP as bad.
Ideally, we would have more specific reasons why this is correct processing.
What other codes could happen here?
> Signed-off-by: Masaharu Hayakawa <masaharu.hayakawa.ry@renesas.com>
> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> ---
> v2 [Simon Horman]
> * Added to patchset targeted at upstream
> * Minor revision of changelog
>
> v0 [Masaharu Hayakawa]
> ---
> drivers/mmc/host/tmio_mmc_core.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/mmc/host/tmio_mmc_core.c b/drivers/mmc/host/tmio_mmc_core.c
> index 6d8719be75a8..41767d33ef97 100644
> --- a/drivers/mmc/host/tmio_mmc_core.c
> +++ b/drivers/mmc/host/tmio_mmc_core.c
> @@ -800,10 +800,7 @@ static int tmio_mmc_execute_tuning(struct mmc_host *mmc, u32 opcode)
> if (host->prepare_tuning)
> host->prepare_tuning(host, i % host->tap_num);
>
> - ret = mmc_send_tuning(mmc, opcode, NULL);
> - if (ret && ret != -EILSEQ)
> - goto out;
> - if (ret == 0)
> + if (!mmc_send_tuning(mmc, opcode, NULL))
I'd prefer (mmc_send_tuning() == 0) here instead of '!mmc_send_tuning()'.
This reads as 'is ok' while the other reads more 'if not ok'.
> set_bit(i, host->taps);
>
> usleep_range(1000, 1200);
> --
> 2.11.0
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2018-02-07 21:52 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-19 13:39 [PATCH v2 0/3] mmc: renesas_sdhi: add eMMC HS400 mode support Simon Horman
2018-01-19 13:39 ` [PATCH v2 1/3] mmc: tmio: correct treatment of errors during tuning Simon Horman
2018-02-07 21:52 ` Wolfram Sang [this message]
2018-02-13 11:31 ` Simon Horman
2018-02-13 12:55 ` Wolfram Sang
2018-01-19 13:39 ` [PATCH v2 2/3] mmc: tmio: add eMMC HS400 mode support Simon Horman
2018-02-07 22:20 ` Wolfram Sang
2018-02-13 11:33 ` Simon Horman
2018-02-13 13:00 ` Wolfram Sang
2018-01-19 13:39 ` [PATCH v2 3/3] mmc: renesas_sdhi: " Simon Horman
2018-02-07 22:21 ` Wolfram Sang
2018-02-13 11:38 ` Simon Horman
2018-02-13 13:01 ` Wolfram Sang
2018-02-07 22:26 ` [PATCH v2 0/3] " Wolfram Sang
2018-02-08 11:37 ` Simon Horman
2018-02-13 11:47 ` Simon Horman
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=20180207215252.dirj5x7ky5bdznmk@ninjato \
--to=wsa@the-dreams.de \
--cc=horms+renesas@verge.net.au \
--cc=linux-mmc@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=magnus.damm@gmail.com \
--cc=ulf.hansson@linaro.org \
--cc=wsa+renesas@sang-engineering.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