[PATCH v3] cmd: sf/nand: Print and return failure when 0 length is passed

Marek Vasut marex at denx.de
Fri Jun 2 08:32:57 CEST 2023


On 6/2/23 08:28, Jagan Teki wrote:
> On Tue, May 30, 2023 at 7:07 PM Marek Vasut <marex at denx.de> wrote:
>>
>> On 5/30/23 14:23, Michal Simek wrote:
>>>
>>>
>>> On 5/16/23 13:52, 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 it to my queue. If someone else wants to take please let me know
>>> and I will drop it from my queue.
>>
>> I believe Jagan should be picking SF patches ?
> 
> Sorry, I missed this during a couple of travels last week.

Time to prepare a late MR against u-boot/next then ?
I think there are also a few other patches pending .


More information about the U-Boot mailing list