On Wed, 2017-10-25 at 14:40 +0200, Alexey Dobriyan wrote: > On 10/25/17, Bart Van Assche wrote: > > > > I think we need a way to encourage driver authors > > to pay attention to endianness annotations, > typedef struct { >         uint32_t _; > } __le32; I actually did that in JFFS2 years ago; before sparse could do it. It was very useful. I'd really like to have proper compiler support for big-endian and little-endian integers too. We're half-way there now with __builtin_bswap32() et al, and compilers can optimise things properly (instead of the opaque inline asm we had before I cleaned that up). But being able to just mark a given integer storage as big- or little- endian and have all loads and stores *automatically* do the right thing would be extremely useful in many cases.