summaryrefslogtreecommitdiffstats
path: root/drivers/net/ntb_netdev.c
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2021-10-08 19:53:39 +0200
committerDavid S. Miller <davem@davemloft.net>2021-10-09 12:55:01 +0200
commitea52a0b58e41c3b2b9e97ff13fe0da9c9e430ea8 (patch)
treebeeede725830633b0e8314873371ce207a3f2929 /drivers/net/ntb_netdev.c
parentMerge branch 'dev_addr-direct-writes' (diff)
downloadlinux-ea52a0b58e41c3b2b9e97ff13fe0da9c9e430ea8.tar.xz
linux-ea52a0b58e41c3b2b9e97ff13fe0da9c9e430ea8.zip
net: use dev_addr_set()
Use dev_addr_set() instead of writing directly to netdev->dev_addr in various misc and old drivers. Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ntb_netdev.c')
-rw-r--r--drivers/net/ntb_netdev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ntb_netdev.c b/drivers/net/ntb_netdev.c
index a5bab614ff84..98ca6b18415e 100644
--- a/drivers/net/ntb_netdev.c
+++ b/drivers/net/ntb_netdev.c
@@ -428,7 +428,7 @@ static int ntb_netdev_probe(struct device *client_dev)
ndev->watchdog_timeo = msecs_to_jiffies(NTB_TX_TIMEOUT_MS);
eth_random_addr(ndev->perm_addr);
- memcpy(ndev->dev_addr, ndev->perm_addr, ndev->addr_len);
+ dev_addr_set(ndev, ndev->perm_addr);
ndev->netdev_ops = &ntb_netdev_ops;
ndev->ethtool_ops = &ntb_ethtool_ops;