Re: [PATCH] net: ezchip: adapt driver to little endian architecture

From: David Miller
Date: Fri Feb 26 2016 - 15:25:25 EST


From: Arnd Bergmann <arnd@xxxxxxxx>
Date: Fri, 26 Feb 2016 21:10:31 +0100

> On Friday 26 February 2016 22:05:09 Lada Trimasova wrote:
>> for (i = 0; i < len; i++, reg++) {
>> u32 buf = nps_enet_reg_get(priv, NPS_ENET_REG_RX_BUF);
>> + buf = be32_to_cpu(buf);
>> put_unaligned(buf, reg);
>> }
>
> I think most of the changes can make use of the put_unaligned_be32()
> etc helpers that might also be more efficient.

Agreed.