]> git.baikalelectronics.ru Git - kernel.git/commit
gianfar: Make MAC addr setup endian safe, cleanup
authorClaudiu Manoil <claudiu.manoil@freescale.com>
Tue, 7 Oct 2014 07:44:33 +0000 (10:44 +0300)
committerDavid S. Miller <davem@davemloft.net>
Thu, 9 Oct 2014 05:40:37 +0000 (01:40 -0400)
commit141f3c9c70186c4bee10293291711aba267153b5
treedcdf7fd08ae731364ea09aef2fa725b6b3e6e597
parent9ecbd704733fc23f9a00993f038593d2f40db848
gianfar: Make MAC addr setup endian safe, cleanup

Fix the 32-bit memory access that is not endian safe,
i.e. not giving the desired byte layout for a LE CPU:
tempval = *((u32 *) (tmpbuf + 4)), where 'char tmpbuf[]'.

Get rid of rendundant local vars (tmpbuf[] and idx) and
forced casts.  Cleanup comments.

Signed-off-by: Claudiu Manoil <claudiu.manoil@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/gianfar.c