[PATCH v1 1/7] command sf: help text format

properly indent the help text and use single quotes consistently to mark variable parameters.
Signed-off-by: Bernhard Kirchen bernhard.kirchen@mbconnectline.com ---
cmd/sf.c | 48 ++++++++++++++++++++++-------------------------- 1 file changed, 22 insertions(+), 26 deletions(-)
diff --git a/cmd/sf.c b/cmd/sf.c index c0d6a8f8a0..a991ae0d03 100644 --- a/cmd/sf.c +++ b/cmd/sf.c @@ -564,7 +564,7 @@ static int do_spi_flash(struct cmd_tbl *cmdtp, int flag, int argc,
/* The remaining commands require a selected device */ if (!flash) { - puts("No SPI flash selected. Please run `sf probe'\n"); + puts("No SPI flash selected. Please run 'sf probe'\n"); return 1; }
@@ -590,31 +590,27 @@ usage: return CMD_RET_USAGE; }
-#ifdef CONFIG_CMD_SF_TEST -#define SF_TEST_HELP "\nsf test offset len " \ - "- run a very basic destructive test" -#else -#define SF_TEST_HELP -#endif - U_BOOT_CMD( - sf, 5, 1, do_spi_flash, + sf, 5, 1, do_spi_flash, "SPI flash sub-system", - "probe [[bus:]cs] [hz] [mode] - init flash device on given SPI bus\n" - " and chip select\n" - "sf read addr offset|partition len - read `len' bytes starting at\n" - " `offset' or from start of mtd\n" - " `partition'to memory at `addr'\n" - "sf write addr offset|partition len - write `len' bytes from memory\n" - " at `addr' to flash at `offset'\n" - " or to start of mtd `partition'\n" - "sf erase offset|partition [+]len - erase `len' bytes from `offset'\n" - " or from start of mtd `partition'\n" - " `+len' round up `len' to block size\n" - "sf update addr offset|partition len - erase and write `len' bytes from memory\n" - " at `addr' to flash at `offset'\n" - " or to start of mtd `partition'\n" - "sf protect lock/unlock sector len - protect/unprotect 'len' bytes starting\n" - " at address 'sector'\n" - SF_TEST_HELP + "probe [[bus:]cs] [hz] [mode] - init flash device on given SPI bus\n" + " and chip select\n" + "sf read addr offset|partition len - read 'len' bytes starting at\n" + " 'offset' or from start of mtd\n" + " 'partition' to memory at 'addr'\n" + "sf write addr offset|partition len - write 'len' bytes from memory\n" + " at 'addr' to flash at 'offset'\n" + " or to start of mtd 'partition'\n" + "sf erase offset|partition [+]len - erase 'len' bytes from 'offset'\n" + " or from start of mtd 'partition'.\n" + " '+len' round up 'len' to block size\n" + "sf update addr offset|partition len - erase and write 'len' bytes from memory\n" + " at 'addr' to flash at 'offset'\n" + " or to start of mtd 'partition'\n" + "sf protect lock|unlock sector len - protect/unprotect 'len' bytes starting\n" + " at address 'sector'\n" +#ifdef CONFIG_CMD_SF_TEST + "sf test offset len - run a very basic destructive test\n" + " ranging 'len' bytes from 'offset'\n" +#endif );

On Thu, 28 Jan 2021 at 09:29, Bernhard Kirchen schlimmchen@gmail.com wrote:
properly indent the help text and use single quotes consistently to mark variable parameters.
Signed-off-by: Bernhard Kirchen bernhard.kirchen@mbconnectline.com
cmd/sf.c | 48 ++++++++++++++++++++++-------------------------- 1 file changed, 22 insertions(+), 26 deletions(-)
Reviewed-by: Simon Glass sjg@chromium.org
participants (2)
-
Bernhard Kirchen
-
Simon Glass