From: Peng Fan <Peng.Fan@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] common: mmc: unsigned char compared against 0
Date: Wed, 25 Nov 2015 17:16:21 +0800 [thread overview]
Message-ID: <1448442981-14127-2-git-send-email-Peng.Fan@freescale.com> (raw)
In-Reply-To: <1448442981-14127-1-git-send-email-Peng.Fan@freescale.com>
"enable" is unsigned char type and its value will not be
negative, so discard "enable < 0".
Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Cc: Diego Santa Cruz <Diego.SantaCruz@spinetix.com>
Cc: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Cc: Andrew Gabbasov <andrew_gabbasov@mentor.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Tom Rini <trini@konsulko.com>
---
common/cmd_mmc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/common/cmd_mmc.c b/common/cmd_mmc.c
index dfc1ec8..a6b7313 100644
--- a/common/cmd_mmc.c
+++ b/common/cmd_mmc.c
@@ -747,7 +747,7 @@ static int do_mmc_rst_func(cmd_tbl_t *cmdtp, int flag,
dev = simple_strtoul(argv[1], NULL, 10);
enable = simple_strtoul(argv[2], NULL, 10);
- if (enable > 2 || enable < 0) {
+ if (enable > 2) {
puts("Invalid RST_n_ENABLE value\n");
return CMD_RET_USAGE;
}
--
2.6.2
next prev parent reply other threads:[~2015-11-25 9:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-25 9:16 [U-Boot] [PATCH] common: cli_hush: avoid memory leak Peng Fan
2015-11-25 9:16 ` Peng Fan [this message]
2015-11-27 2:51 ` [U-Boot] [PATCH] common: mmc: unsigned char compared against 0 Simon Glass
2015-11-27 4:58 ` Peng Fan
2015-12-06 22:06 ` [U-Boot] " Tom Rini
2015-11-26 17:49 ` [U-Boot] [PATCH] common: cli_hush: avoid memory leak Simon Glass
2015-11-27 2:04 ` Peng Fan
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=1448442981-14127-2-git-send-email-Peng.Fan@freescale.com \
--to=peng.fan@freescale.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.