From 0a574e42fac7597e3392ee64b2fe9304c55910e8 Mon Sep 17 00:00:00 2001 From: Vladimir Oltean Date: Thu, 29 Oct 2020 04:27:35 +0200 Subject: [PATCH] net: mscc: ocelot: use ether_addr_copy Since a helper is available for copying Ethernet addresses, let's use it. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski --- drivers/net/ethernet/mscc/ocelot.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/mscc/ocelot.c b/drivers/net/ethernet/mscc/ocelot.c index 25152f1f2939a..763d0277eeaed 100644 --- a/drivers/net/ethernet/mscc/ocelot.c +++ b/drivers/net/ethernet/mscc/ocelot.c @@ -997,7 +997,7 @@ static void ocelot_encode_ports_to_mdb(unsigned char *addr, struct ocelot_multicast *mc, enum macaccess_entry_type entry_type) { - memcpy(addr, mc->addr, ETH_ALEN); + ether_addr_copy(addr, mc->addr); if (entry_type == ENTRYTYPE_MACv4) { addr[0] = 0; @@ -1042,7 +1042,7 @@ int ocelot_port_mdb_add(struct ocelot *ocelot, int port, if (!mc) return -ENOMEM; - memcpy(mc->addr, mdb->addr, ETH_ALEN); + ether_addr_copy(mc->addr, mdb->addr); mc->vid = vid; mc->pgid = pgid; -- 2.39.5