On Thu, Jun 04, 2009 at 09:03:47PM +0200, Wolfgang Denk wrote: > > +static inline u16 get_unaligned_le16(const void *p) > > +{ > > + return __get_unaligned_cpu16((const u8 *)p); > > +} > > + > > +static inline u32 get_unaligned_le32(const void *p) > > +{ > > + return __get_unaligned_cpu32((const u8 *)p); > > +} > > + > > +static inline u64 get_unaligned_le64(const void *p) > > +{ > > + return __get_unaligned_cpu64((const u8 *)p); > > +} > > Are these 3 really all "u8" pointers, or is this a copy & paste error?
Yes, this is how it came from the Linux kernel and my tests show that these access methods work well. > Is there any guarantee that such macros are never used on device > registers and the like? Well - how can I guarantee that? Anyway - the functions can be enhanced later to make them work with different types of memories. For now, they implement a working set of functions to allow ubifs (and probably other code as well) to be compiled and ran on ARMs. Daniel _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot