[U-Boot] [PATCH] mtest: Fix end address of increment/decrement test

Wolfgang Denk wd at denx.de
Thu May 20 20:43:30 CEST 2010


Dear Peter Tyser,

In message <1274375283-13004-1-git-send-email-ptyser at xes-inc.com> you wrote:
> 
> The incrememt/decrement test has an off-by-one error which results in an
> extra 4 bytes being tested past the specified end address.  For
> instance, when running "mtest 0x1000 0x2000", the bytes 0x2000-0x2003
> would be tested which is counterintuitive and at odds with the end
> address calculation of other U-Boot memory tests.

I disagree. I understand your reasoning, but actually it has always
been the case that commands that take an address reagion specify as
end address the last address to be used, not oni behind the range.
You may not like this, but that's how it has been implemented > 10
years ago, and many people are trained on this behaviour. See for
example the flash erase command, wehre you will type something like

	=> erase 40040000 4007FFFF

Here, like in other places, we really use the end address.

So for the sake of consisteny I tend to reject your patch.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
A Perl script is correct if it's halfway readable and  gets  the  job
done before your boss fires you.
                       - L. Wall & R. L. Schwartz, _Programming Perl_


More information about the U-Boot mailing list