[PATCH v5 2/2] cmd: mtd: add benchmark option to the help

Miquel Raynal miquel.raynal at bootlin.com
Fri Aug 29 23:54:22 CEST 2025


On 29/08/2025 at 10:59:11 +03, Mikhail Kshevetskiy <mikhail.kshevetskiy at iopsys.eu> wrote:

> The patch adds benchmark option to the help of mtd command. For the
> 'mtd write' case the help line exceed 80 characters. Ignore this issue
> as modern terminals are capable to handle more characters.
>
> The patch also formats other command to make sure all device names
> starts on the same collumn.
>
> Fixes: d246e70cf81d0 ("cmd: mtd: Enable speed benchmarking")
> Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy at iopsys.eu>
> ---
>  cmd/mtd.c | 18 +++++++++---------
>  1 file changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/cmd/mtd.c b/cmd/mtd.c
> index 57f6c700f1d..f053dbadd78 100644
> --- a/cmd/mtd.c
> +++ b/cmd/mtd.c
> @@ -782,18 +782,18 @@ static int mtd_name_complete(int argc, char *const argv[], char last_char,
>  U_BOOT_LONGHELP(mtd,
>  	"- generic operations on memory technology devices\n\n"
>  	"mtd list\n"
> -	"mtd read[.raw][.oob]                  <name> <addr> [<off> [<size>]]\n"
> -	"mtd dump[.raw][.oob]                  <name>        [<off> [<size>]]\n"
> -	"mtd write[.raw][.oob][.dontskipff]    <name> <addr> [<off> [<size>]]\n"
> -	"mtd erase[.dontskipbad]               <name>        [<off> [<size>]]\n"
> +	"mtd read[.raw][.oob][.benchmark]                <name> <addr> [<off> [<size>]]\n"
> +	"mtd dump[.raw][.oob]                            <name>        [<off> [<size>]]\n"
> +	"mtd write[.raw][.oob][.dontskipff][.benchmark]  <name> <addr> [<off> [<size>]]\n"
> +	"mtd erase[.dontskipbad]                         <name>        [<off> [<size>]]\n"
>  	"\n"
>  	"Specific functions:\n"
> -	"mtd bad                               <name>\n"
> +	"mtd bad                                         <name>\n"
>  #if CONFIG_IS_ENABLED(CMD_MTD_OTP)
> -	"mtd otpread                           <name> [u|f] <off> <size>\n"
> -	"mtd otpwrite                          <name> <off> <hex string>\n"
> -	"mtd otplock                           <name> <off> <size>\n"
> -	"mtd otpinfo                           <name> [u|f]\n"
> +	"mtd otpread                                     <name> [u|f] <off> <size>\n"
> +	"mtd otpwrite                                    <name> <off> <hex string>\n"
> +	"mtd otplock                                     <name> <off> <size>\n"
> +	"mtd otpinfo                                     <name> [u|f]\n"
>  #endif
>  	"\n"
>  	"With:\n"

I'll let the decision to other U-Boot reviewers, but I don't know if
that is relevant to align all the parameters to the longest line.

Either ways, I'm fine,

Reviewed-by: Miquel Raynal <miquel.raynal at bootlin.com>

Thanks,
Miquèl


More information about the U-Boot mailing list