Dear Aneesh V, In message <[email protected]> you wrote: > > > It's more. When using base+offset, the compiler will know nothing > > about the data type, so it canot warn you if you use a 32 bit accessor > > on a 8 bit register, or vice versa. When you pass a struct element, > > it can check type information. > > Is this really valid in our context? readl()/writel() and friends just > cast the address to the target type pointer. I tried writeb() on my 32 > bit register represented using the struct approach and the compiler > didn't give any warning (as expected)!
Yes, we should fix the I/O accessors definitons on ARM to provide strict type checking. 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: [email protected] The software required `Windows 95 or better', so I installed Linux. _______________________________________________ U-Boot mailing list [email protected] http://lists.denx.de/mailman/listinfo/u-boot

