summaryrefslogtreecommitdiffstats
path: root/drivers/net/usb
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2021-10-13 22:44:32 +0200
committerJakub Kicinski <kuba@kernel.org>2021-10-14 18:22:19 +0200
commitc51e5062c18067ccdc85798c2051edfc37e2475d (patch)
treeb1db6aa8ffd5025c60317701cb29b5676156726c /drivers/net/usb
parentethernet: make use of eth_hw_addr_random() where appropriate (diff)
downloadlinux-c51e5062c18067ccdc85798c2051edfc37e2475d.tar.xz
linux-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/usb')
-rw-r--r--drivers/net/usb/pegasus.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/usb/pegasus.c b/drivers/net/usb/pegasus.c
index 6a92a3fef75e..c4cd40b090fd 100644
--- a/drivers/net/usb/pegasus.c
+++ b/drivers/net/usb/pegasus.c
@@ -357,7 +357,7 @@ static void set_ethernet_addr(pegasus_t *pegasus)
goto err;
}
- memcpy(pegasus->net->dev_addr, node_id, sizeof(node_id));
+ eth_hw_addr_set(pegasus->net, node_id);
return;
err: