[U-Boot] [PATCH V3 1/3] lib_generic memcpy: copy one word at a time if possible
Alessandro Rubini
rubini at unipv.it
Sat Oct 10 09:44:31 CEST 2009
Hello Chris
>> + unsigned long *dl = (unsigned long *)dest, *sl = (unsigned long *)src;
> Nitpick: Are you sure the casts are necessary here ?
Without the one on src it complains because of "const". So I write
both for symetry.
> + if ( (((ulong)dest | (ulong)src) & (sizeof(*dl) - 1)) == 0) {
>
> The "or" should not include count: the remaining count % sizeof(unsigned
> long) bytes are copied below.
Yes, that's why I'm sending V4 today. Actually, I booted V3 but didn't
measure it, so this bug went unnoticed. But I won't measure it today,
either...
Ok for spaces around operators (even if the whole of string.c is
strangely spaced, but that's historical).
thanks
/alessandro
More information about the U-Boot
mailing list