On 20:32 Sat 02 May , Wolfgang Denk wrote: > Dear Jean-Christophe PLAGNIOL-VILLARD, > > In message <1241219918-22846-1-git-send-email-plagn...@jcrosoft.com> you > wrote: > > remove duplicated and clean it > > Please just remove this. I mean, without attempting to clean it up. > > [And not only on ARM, but everywhere.] Actually For ARM we ask us tp use it so to simplify the import from linux this "helper" are also imported > > > I never understood why "SZ_8K" would be better than 8192 or 8*1024 ? Honnestly it's not my goal here. My goal is to rationalize the sizes.h file content and location to be the same as the kernel
> > > Note that, apart from personal preferences, these "helpful" defi- > nitions are misleading and at least sometimes even plain wrong. See > below for details. > > .... > > --- a/include/asm-arm/sizes.h > > +++ b/include/asm-arm/sizes.h > > @@ -16,7 +16,7 @@ > > /* DO NOT EDIT!! - this file automatically generated > > * from .s file by awk -f s2h.awk > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > It seems you ignore this warning? Is this a wise thing to do? I've import the last linux version of it > > > /* handy sizes */ > > +#define SZ_16 0x00000010 > > +#define SZ_256 0x00000100 > > +#define SZ_512 0x00000200 > > NAK. I will not accept a patch that adds such definitions. That's > ridiculous. What is the problem of writing "16" when you mean "16"? > Why would "SZ_512" be any better than plain "512" - except that it's > twice as much to type. > > > > #define SZ_1K 0x00000400 > > #define SZ_4K 0x00001000 > > #define SZ_8K 0x00002000 > > Please keep in mind that "K", "M", and "G" are non-standard prefixes, > and it is not clear if they refer to decimal or binary multiples. > This makes their use in the code a PITA. I do not choose it > > We should try to be precise, and we should follow existing standards. > > Prefixes and symbols for binary multiples are standardized in IEC > 60027-2. [They are not part of the SI metric system of units, > though.] Correct names for 1024 = (1 << 10), 1024*1024 = ( 1 << 20) > and 1024*1024*1024 = (1 << 30) are "kibi" (kilobinary, abbreviated as > "Ki"), "mebi" (megabinary, "Mi"), and "gibi" (gigabinary, "Gi"), > respective. Note that this is "Ki", not "K". I known but it's the linux implementation choice not mine > > So if you think youmust define something that means 8192, then please > name it "8 Ki", as "Ki" is the correct, standardized symbol for the > name "kibi", meaning "kilobinary". Honnestly I think I'll let you try to deal it with Russel > > > With "8 K", nobody ever knows for sure what is meant - is it 8*10**3 > or is it 8*2**10. > > Thus my urgent recommendation: let's get rid of all this ambiguous > SZ_* definitions and use numbers. "8 * 1024" is at least as readable > as "SZ_8K", and it leaves no doubt what might be meant. To simplify linux import I'll not prefer it Best Regards, J. _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot