From: Jaehoon Chung <jh80.chung@samsung.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 4/7] mmc: Update the handling of returned erase block
Date: Fri, 08 Nov 2013 10:29:22 +0900 [thread overview]
Message-ID: <527C3E72.3090306@samsung.com> (raw)
In-Reply-To: <1383632633-27262-4-git-send-email-Haijun.Zhang@freescale.com>
Dear Haijun,
Check the below message, plz.
cmd_mmc.c: In function ?do_mmcops?:
cmd_mmc.c:405:5: warning: comparisons like ?X<=Y<=Z? do not have their mathematical meaning [-Wparentheses]
cmd_mmc.c:406:5: warning: comparisons like ?X<=Y<=Z? do not have their mathematical meaning [-Wparentheses]
cmd_mmc.c:407:4: warning: comparisons like ?X<=Y<=Z? do not have their mathematical meaning [-Wparentheses]
Best Regards,
Jaehoon Chung
On 11/05/2013 03:23 PM, Haijun Zhang wrote:
> If the block rang was not algined, We tried to algined the range,
> then erase the block. So the block range erased should be less or
> equal to the block range send. If error occured during erase procedure
> part of them will be erased. And use should resend the block rang to
> continue erase the reset of them.
>
> Error number and zero number mean erase operation was failed.
>
> Signed-off-by: Haijun Zhang <haijun.zhang@freescale.com>
> ---
> common/cmd_mmc.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/common/cmd_mmc.c b/common/cmd_mmc.c
> index 67a94a7..15cecb7 100644
> --- a/common/cmd_mmc.c
> +++ b/common/cmd_mmc.c
> @@ -397,6 +397,13 @@ static int do_mmcops(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
> BUG();
> }
>
> + if (state == MMC_ERASE) {
> + printf("%d blocks %s: %s\n",
> + (cnt >= n > 0) ? n : 0, argv[1],
> + (cnt >= n > 0) ? "OK" : "ERROR");
> + return (cnt >= n > 0) ? 0 : 1;
> + }
> +
> printf("%d blocks %s: %s\n",
> n, argv[1], (n == cnt) ? "OK" : "ERROR");
> return (n == cnt) ? 0 : 1;
>
next prev parent reply other threads:[~2013-11-08 1:29 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-05 6:23 [U-Boot] [PATCH 1/7] mmc: Add some usefull macro definition Haijun Zhang
2013-11-05 6:23 ` [U-Boot] [PATCH 2/7] mmc: Get secure erase information from card Haijun Zhang
2013-11-05 6:23 ` [U-Boot] [PATCH 3/7] mmc: Enhance erase handling procedure Haijun Zhang
2013-12-08 11:19 ` Pantelis Antoniou
2013-11-05 6:23 ` [U-Boot] [PATCH 4/7] mmc: Update the handling of returned erase block Haijun Zhang
2013-11-08 1:29 ` Jaehoon Chung [this message]
2013-12-08 11:21 ` Pantelis Antoniou
2013-11-05 6:23 ` [U-Boot] [PATCH 5/7] mmc: Enhance mmcinfo command Haijun Zhang
2013-12-08 11:22 ` Pantelis Antoniou
2013-11-05 6:23 ` [U-Boot] [PATCH 6/7] Powerpc/esdhc: Add esdhc host version define Haijun Zhang
2013-11-05 6:23 ` [U-Boot] [PATCH 7/7] powerpc/esdhc: Update esdhc command execution process Haijun Zhang
2013-12-08 11:28 ` Pantelis Antoniou
2013-11-08 1:15 ` [U-Boot] [PATCH 1/7] mmc: Add some usefull macro definition Jaehoon Chung
2013-11-08 2:05 ` Zhang Haijun
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=527C3E72.3090306@samsung.com \
--to=jh80.chung@samsung.com \
--cc=u-boot@lists.denx.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.