summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/8390/mcf8390.c
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2021-10-08 19:59:13 +0200
committerDavid S. Miller <davem@davemloft.net>2021-10-09 12:46:57 +0200
commit8ce218b6e58ad9d2149402ea48ae8dbb0c57b1b5 (patch)
tree0a2de992be4a84f5017305fee96d67c76b1c8388 /drivers/net/ethernet/8390/mcf8390.c
parentethernet: sun: remove direct netdev->dev_addr writes (diff)
downloadlinux-8ce218b6e58ad9d2149402ea48ae8dbb0c57b1b5.tar.xz
linux-8ce218b6e58ad9d2149402ea48ae8dbb0c57b1b5.zip
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/mcf8390.c')
-rw-r--r--drivers/net/ethernet/8390/mcf8390.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/ethernet/8390/mcf8390.c b/drivers/net/ethernet/8390/mcf8390.c
index 4ad8031ab669..e320cccba61a 100644
--- a/drivers/net/ethernet/8390/mcf8390.c
+++ b/drivers/net/ethernet/8390/mcf8390.c
@@ -374,8 +374,7 @@ static int mcf8390_init(struct net_device *dev)
if (ret)
return ret;
- for (i = 0; i < ETH_ALEN; i++)
- dev->dev_addr[i] = SA_prom[i];
+ eth_hw_addr_set(dev, SA_prom);
netdev_dbg(dev, "Found ethernet address: %pM\n", dev->dev_addr);