public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Yao Zi <me@ziyao.cc>
To: Peng Fan <peng.fan@nxp.com>,
	Jaehoon Chung <jh80.chung@samsung.com>,
	Tom Rini <trini@konsulko.com>,
	Jerome Forissier <jerome.forissier@linaro.org>,
	Mattijs Korpershoek <mkorpershoek@kernel.org>
Cc: u-boot@lists.denx.de, Yao Zi <me@ziyao.cc>
Subject: [PATCH 3/3] cmd: mmc: Return symbolic value when part switching fails in mmc dev
Date: Fri, 30 Jan 2026 18:03:53 +0000	[thread overview]
Message-ID: <20260130180353.42205-4-me@ziyao.cc> (raw)
In-Reply-To: <20260130180353.42205-1-me@ziyao.cc>

Return symbolic value CMD_RET_FAILURE instead of literal "1" when
failing to switch the partition to improve readability.

Signed-off-by: Yao Zi <me@ziyao.cc>
---
 cmd/mmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cmd/mmc.c b/cmd/mmc.c
index 512bd482ae82..bcbe963f8ac0 100644
--- a/cmd/mmc.c
+++ b/cmd/mmc.c
@@ -606,7 +606,7 @@ static int do_mmc_dev(struct cmd_tbl *cmdtp, int flag,
 	printf("switch to partitions #%d, %s\n",
 	       part, (!ret) ? "OK" : "ERROR");
 	if (ret)
-		return 1;
+		return CMD_RET_FAILURE;
 
 	curr_device = dev;
 	if (mmc->part_config == MMCPART_NOAVAILABLE)
-- 
2.52.0


  parent reply	other threads:[~2026-01-30 18:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-30 18:03 [PATCH 0/3] Code improvements and argument checks for mmc dev subcommand Yao Zi
2026-01-30 18:03 ` [PATCH 1/3] cmd: mmc: Simplify dev subcommand handling Yao Zi
2026-01-30 18:03 ` [PATCH 2/3] cmd: mmc: Check whether arguments are valid numbers in dev subcommand Yao Zi
2026-01-30 18:03 ` Yao Zi [this message]
2026-02-02  7:51 ` [PATCH 0/3] Code improvements and argument checks for mmc " Anshul Dalal
2026-02-03 11:55 ` Peng Fan
2026-02-03 14:18 ` Peng Fan (OSS)

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=20260130180353.42205-4-me@ziyao.cc \
    --to=me@ziyao.cc \
    --cc=jerome.forissier@linaro.org \
    --cc=jh80.chung@samsung.com \
    --cc=mkorpershoek@kernel.org \
    --cc=peng.fan@nxp.com \
    --cc=trini@konsulko.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox