summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/myricom
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2021-10-13 13:44:34 -0700
committerJakub Kicinski <kuba@kernel.org>2021-10-14 09:22:25 -0700
commit562ef98a666eef8e32a6057af37a577163ab6946 (patch)
tree4e324b117548a95473925a8383f706138427b2eb /drivers/net/ethernet/myricom
parent68a064028e4e85b7a9dbfe58fc43b34060c11d39 (diff)
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/myricom')
-rw-r--r--drivers/net/ethernet/myricom/myri10ge/myri10ge.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/ethernet/myricom/myri10ge/myri10ge.c b/drivers/net/ethernet/myricom/myri10ge/myri10ge.c
index 5ae59b1e5b48..5736fcdafd7a 100644
--- a/drivers/net/ethernet/myricom/myri10ge/myri10ge.c
+++ b/drivers/net/ethernet/myricom/myri10ge/myri10ge.c
@@ -3739,7 +3739,6 @@ static int myri10ge_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
struct net_device *netdev;
struct myri10ge_priv *mgp;
struct device *dev = &pdev->dev;
- int i;
int status = -ENXIO;
int dac_enabled;
unsigned hdr_offset, ss_offset;
@@ -3829,8 +3828,7 @@ static int myri10ge_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
if (status)
goto abort_with_ioremap;
- for (i = 0; i < ETH_ALEN; i++)
- netdev->dev_addr[i] = mgp->mac_addr[i];
+ eth_hw_addr_set(netdev, mgp->mac_addr);
myri10ge_select_firmware(mgp);