On Thu, 7 Feb 2008, Jerry Van Baren wrote: > Your original question/concept still used the name "addr_mask" which caused > confusion on my part.
Ahhh, that's just a variable name:-) > It really should be a length, not a mask. Of course. > Illustrating > with a hand-generated patch, what I am now hearing is the following change: > > - addr_mask = ((ulong)end - (ulong)start)/sizeof(vu_long); > + len = ((ulong)end - (ulong)start)/sizeof(vu_long); > ... > - for (offset = 1; (offset & addr_mask) != 0; offset <<= 1) { > + for (offset = 1; offset < len; offset <<= 1) { > start[offset] = pattern; > } > > That makes sense to me. Exactly. If everyone agrees, I'll try not to forget to cook up a patch. Thanks Guennadi --- Guennadi Liakhovetski ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users