[PATCH v3] cmd: sf/nand: Print and return failure when 0 length is passed
Tom Rini
trini at konsulko.com
Thu Jun 1 17:25:10 CEST 2023
On Tue, May 16, 2023 at 05:52:36AM -0600, Ashok Reddy Soma wrote:
> For sf commands, when '0' length is passed for erase, update, write or
> read, there might be undesired results. Ideally '0' length means nothing to
> do.
>
> So print 'ERROR: Invalid size 0' and return cmd failure when length '0' is
> passed to sf commands. Same thing applies for nand commands also.
>
> Example:
>
> ZynqMP> sf erase 0 0
> ERROR: Invalid size 0
> ZynqMP> sf write 10000 0 0
> ERROR: Invalid size 0
> ZynqMP> sf read 10000 0 0
> ERROR: Invalid size 0
> ZynqMP> sf update 1000 10000 0
> ERROR: Invalid size 0
> ZynqMP>
>
> Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma at amd.com>
Applied to u-boot/next, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20230601/2c67ce72/attachment.sig>
More information about the U-Boot
mailing list