[U-Boot] [PATCH V4 01/11] imximage: mx53 needs transfer length a multiple of 512

Wolfgang Denk wd at denx.de
Wed Nov 28 10:27:58 CET 2012


Dear Troy Kisky,

In message <1354066303-29762-2-git-send-email-troy.kisky at boundarydevices.com> you wrote:
> The mx53 ROM will truncate the length at a multiple of 512.
> Transferring too much is not a problem, so round up.

What about other SoCs using the same code?

> +#define ALIGN(a, b)	(((a) + (b) - 1) & ~((b) - 1))

NAK. This macro is mis-named; it has nothing to do with alignment -
you write yourself: "round up".


And you don't have to re-invent the wheel.  Please use the existing
macros for this purpose.

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
If something is different, it's either better or worse,  and  usually
both.                                                    - Larry Wall


More information about the U-Boot mailing list