diff options
author | Jakub Kicinski <kuba@kernel.org> | 2021-10-13 13:44:32 -0700 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2021-10-14 09:22:19 -0700 |
commit | c51e5062c18067ccdc85798c2051edfc37e2475d (patch) | |
tree | b1db6aa8ffd5025c60317701cb29b5676156726c /drivers/net/ethernet/cadence | |
parent | db0dcc6a8a7c9051f9228c0f745f1e1d029ae4fa (diff) | |
download | lwn-c51e5062c18067ccdc85798c2051edfc37e2475d.tar.gz lwn-c51e5062c18067ccdc85798c2051edfc37e2475d.zip |
ethernet: manually convert memcpy(dev_addr,..., sizeof(addr))
A handful of drivers use sizeof(addr) for the size of
the address, after manually confirming the size is
indeed 6 convert them to eth_hw_addr_set().
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Acked-by: Petko Manolov <petkan@nucleusys.com>
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/cadence')
-rw-r--r-- | drivers/net/ethernet/cadence/macb_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c index 683f14665c2c..029dea2873e3 100644 --- a/drivers/net/ethernet/cadence/macb_main.c +++ b/drivers/net/ethernet/cadence/macb_main.c @@ -313,7 +313,7 @@ static void macb_get_hwaddr(struct macb *bp) addr[5] = (top >> 8) & 0xff; if (is_valid_ether_addr(addr)) { - memcpy(bp->dev->dev_addr, addr, sizeof(addr)); + eth_hw_addr_set(bp->dev, addr); return; } } |