diff options
author | Jakub Kicinski <kuba@kernel.org> | 2021-10-13 13:44:34 -0700 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2021-10-14 09:22:25 -0700 |
commit | 562ef98a666eef8e32a6057af37a577163ab6946 (patch) | |
tree | 4e324b117548a95473925a8383f706138427b2eb /drivers/net/ethernet/sun | |
parent | 68a064028e4e85b7a9dbfe58fc43b34060c11d39 (diff) | |
download | lwn-562ef98a666eef8e32a6057af37a577163ab6946.tar.gz lwn-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/sun')
-rw-r--r-- | drivers/net/ethernet/sun/sunbmac.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/ethernet/sun/sunbmac.c b/drivers/net/ethernet/sun/sunbmac.c index d70426670c37..531a6f449afa 100644 --- a/drivers/net/ethernet/sun/sunbmac.c +++ b/drivers/net/ethernet/sun/sunbmac.c @@ -1076,7 +1076,6 @@ static int bigmac_ether_init(struct platform_device *op, struct net_device *dev; u8 bsizes, bsizes_more; struct bigmac *bp; - int i; /* Get a new device struct for this interface. */ dev = alloc_etherdev(sizeof(struct bigmac)); @@ -1086,8 +1085,7 @@ static int bigmac_ether_init(struct platform_device *op, if (version_printed++ == 0) printk(KERN_INFO "%s", version); - for (i = 0; i < 6; i++) - dev->dev_addr[i] = idprom->id_ethaddr[i]; + eth_hw_addr_set(dev, idprom->id_ethaddr); /* Setup softc, with backpointers to QEC and BigMAC SBUS device structs. */ bp = netdev_priv(dev); |