]> git.baikalelectronics.ru Git - kernel.git/commit
sh_eth: read MAC address registers only once
authorSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Fri, 4 Dec 2015 21:58:57 +0000 (00:58 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sun, 6 Dec 2015 03:45:56 +0000 (22:45 -0500)
commite38d03e8ca091a772f8b61bea4f5cdd686f9d13a
tree9cc1e4fa08f87b2c7cdc1ac169a0136074b871ec
parentc98251f64378385ec94881c2a75880211ca63ff5
sh_eth: read MAC address registers only once

The code reading the MAHR/MALR registers in read_mac_address() is terribly
ineffective -- it reads MAHR 4 times and MALR 2 times, while it's enough to
read each register only once.  Use the local variables to achieve that,
somewhat beautifying the code while at it...

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/renesas/sh_eth.c