]> git.baikalelectronics.ru Git - kernel.git/commit
r8169: Avoid pointer aliasing
authorThierry Reding <treding@nvidia.com>
Wed, 6 Feb 2019 12:30:18 +0000 (13:30 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 6 Feb 2019 21:40:08 +0000 (13:40 -0800)
commitf0b2f7fde5540b0cbdd85aad049407bd164b6b5e
tree6bd19596f8d8862ae28b99259db0c62ae7f24ab2
parentd5d72a9496565db7a492cdec5ed8a2230c67522e
r8169: Avoid pointer aliasing

Read MAC address 32-bit at a time and manually extract the individual
bytes. This avoids pointer aliasing and gives the compiler a better
chance of optimizing the operation.

Suggested-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/realtek/r8169.c