Skip to content

Code improvements and argument checks for mmc dev subcommand

Yao Zi u-boot 1 version Applied

Status from this message: Applied to mmc for 2026.04-rc2, thanks!

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 3 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/3cmd: mmc: Simplify dev subcommand handlingcmd/mmc.c+14 -200 replies
2/3cmd: mmc: Check whether arguments are valid numbers in dev subcommandcmd/mmc.c+19 -40 replies
3/3cmd: mmc: Return symbolic value when part switching fails in mmc devcmd/mmc.c+1 -10 replies

Reviews trailers per patch

None of the 3 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchAnshul DalalPeng Fan
SeriesT-b R-b
1/3
2/3
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/3] Code improvements and argument checks for mmc dev subcommand

This series reduces code duplication by utilizing fallthrough, then adds extra checks for arguments of mmc dev to ensure they're valid numbers, preventing unexpected behavior.

The last patch replaces an integer literal returned in do_mmc_dev() by its corresponding symbolic constant, CMD_RET_FAILURE to improve readability, no function change is involved.

Yao Zi (3):
cmd: mmc: Simplify dev subcommand handling
cmd: mmc: Check whether arguments are valid numbers in dev subcommand
cmd: mmc: Return symbolic value when part switching fails in mmc dev

 cmd/mmc.c | 55 ++++++++++++++++++++++++++++++++-----------------------
 1 file changed, 32 insertions(+), 23 deletions(-)
Signature · 1 line
2.52.0