diff options
author | Jakub Kicinski <kuba@kernel.org> | 2021-10-08 20:59:13 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-10-09 13:46:57 +0300 |
commit | 8ce218b6e58ad9d2149402ea48ae8dbb0c57b1b5 (patch) | |
tree | 0a2de992be4a84f5017305fee96d67c76b1c8388 /drivers/net/ethernet/8390/stnic.c | |
parent | a7639279c93c1e07a703c0f86f0831d4ea2314f0 (diff) | |
download | linux-8ce218b6e58ad9d2149402ea48ae8dbb0c57b1b5.tar.xz |
ethernet: 8390: remove direct netdev->dev_addr writes
8390 contains a lot of loops assigning netdev->dev_addr
byte by byte. Convert what's possible directly to
eth_hw_addr_set(), use local buf in other places.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/8390/stnic.c')
-rw-r--r-- | drivers/net/ethernet/8390/stnic.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/ethernet/8390/stnic.c b/drivers/net/ethernet/8390/stnic.c index fbbd7f22c142..bd89ca8a92df 100644 --- a/drivers/net/ethernet/8390/stnic.c +++ b/drivers/net/ethernet/8390/stnic.c @@ -104,8 +104,8 @@ STNIC_WRITE (int reg, byte val) static int __init stnic_probe(void) { struct net_device *dev; - int i, err; struct ei_device *ei_local; + int err; /* If we are not running on a SolutionEngine, give up now */ if (! MACH_SE) @@ -119,8 +119,7 @@ static int __init stnic_probe(void) #ifdef CONFIG_SH_STANDARD_BIOS sh_bios_get_node_addr (stnic_eadr); #endif - for (i = 0; i < ETH_ALEN; i++) - dev->dev_addr[i] = stnic_eadr[i]; + eth_hw_addr_set(dev, stnic_eadr); /* Set the base address to point to the NIC, not the "real" base! */ dev->base_addr = 0x1000; |