On 12/17/19 10:27 AM, Heinrich Schuchardt wrote: > With GCC 9.2.1 errors of type -Werror=address-of-packed-member occur when > passing a member of a packed structure to le16_to_cpus() on a big endian > system (e.g. P2041RDB_defconfig). > > Replace le16_to_cpus() by get_unaligned_le16(). Check defined(__BIG_ENDIAN) > to avoid the introduction of unnecessary instructions on little endian > systems as seen on aarch64.
I would expect the compiler would optimize such stuff out ? Can we do without the ifdef ? [...]