diff options
author | Jakub Kicinski <kuba@kernel.org> | 2021-10-13 22:44:34 +0200 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2021-10-14 18:22:25 +0200 |
commit | 562ef98a666eef8e32a6057af37a577163ab6946 (patch) | |
tree | 4e324b117548a95473925a8383f706138427b2eb /drivers/net/ethernet/amd/sunlance.c | |
parent | ethernet: ibm/emac: use of_get_ethdev_address() to load dev_addr (diff) | |
download | linux-562ef98a666eef8e32a6057af37a577163ab6946.tar.xz linux-562ef98a666eef8e32a6057af37a577163ab6946.zip |
ethernet: replace netdev->dev_addr assignment loops
A handful of drivers contains loops assigning the mac
addr byte by byte. Convert those to eth_hw_addr_set().
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/amd/sunlance.c')
-rw-r--r-- | drivers/net/ethernet/amd/sunlance.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/ethernet/amd/sunlance.c b/drivers/net/ethernet/amd/sunlance.c index ddece276ae23..22d609563af8 100644 --- a/drivers/net/ethernet/amd/sunlance.c +++ b/drivers/net/ethernet/amd/sunlance.c @@ -1301,7 +1301,6 @@ static int sparc_lance_probe_one(struct platform_device *op, struct device_node *dp = op->dev.of_node; struct lance_private *lp; struct net_device *dev; - int i; dev = alloc_etherdev(sizeof(struct lance_private) + 8); if (!dev) @@ -1315,8 +1314,7 @@ static int sparc_lance_probe_one(struct platform_device *op, * will copy the address in the device structure to the lance * initialization block. */ - for (i = 0; i < 6; i++) - dev->dev_addr[i] = idprom->id_ethaddr[i]; + eth_hw_addr_set(dev, idprom->id_ethaddr); /* Get the IO region */ lp->lregs = of_ioremap(&op->resource[0], 0, |