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/smsc | |
parent | 68a064028e4e85b7a9dbfe58fc43b34060c11d39 (diff) | |
download | linux-562ef98a666eef8e32a6057af37a577163ab6946.tar.gz linux-562ef98a666eef8e32a6057af37a577163ab6946.tar.bz2 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/smsc')
-rw-r--r-- | drivers/net/ethernet/smsc/smc91c92_cs.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/ethernet/smsc/smc91c92_cs.c b/drivers/net/ethernet/smsc/smc91c92_cs.c index 42fc37c7887a..e5658aa39765 100644 --- a/drivers/net/ethernet/smsc/smc91c92_cs.c +++ b/drivers/net/ethernet/smsc/smc91c92_cs.c @@ -666,14 +666,13 @@ static int pcmcia_osi_mac(struct pcmcia_device *p_dev, void *priv) { struct net_device *dev = priv; - int i; if (tuple->TupleDataLen < 8) return -EINVAL; if (tuple->TupleData[0] != 0x04) return -EINVAL; - for (i = 0; i < 6; i++) - dev->dev_addr[i] = tuple->TupleData[i+2]; + + eth_hw_addr_set(dev, &tuple->TupleData[2]); return 0; }; |