From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peng Fan Date: Wed, 25 Nov 2015 17:16:21 +0800 Subject: [U-Boot] [PATCH] common: mmc: unsigned char compared against 0 In-Reply-To: <1448442981-14127-1-git-send-email-Peng.Fan@freescale.com> References: <1448442981-14127-1-git-send-email-Peng.Fan@freescale.com> Message-ID: <1448442981-14127-2-git-send-email-Peng.Fan@freescale.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de "enable" is unsigned char type and its value will not be negative, so discard "enable < 0". Signed-off-by: Peng Fan Cc: Diego Santa Cruz Cc: Pantelis Antoniou Cc: Andrew Gabbasov Cc: Simon Glass Cc: Stefano Babic Cc: Tom Rini --- 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