Skip to contentSkip to conversation

batman-adv: use ether_addr_copy instead of memcpy in multicast code

PATCH Superseded Linus Lüssing 2 participants 2 messages Feb 17, 2014 – Feb 18, 2014

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 batman-adv: use ether_addr_copy instead of memcpy in multicast code

ether_addr_copy is supposed to be slightly more efficient for copying mac addresses, so let's use it. This makes recent versions of checkpatch happy, too.

---
 multicast.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
multicast.c +1 -1
index 00bb30e..e69143b 100644
@@ -45,7 +45,7 @@ static int batadv_mcast_mla_softif_get(struct net_device *dev,
 			break;
 		}
 
-		memcpy(&new->addr, &mc_list_entry->addr, ETH_ALEN);
+		ether_addr_copy(&new->addr, &mc_list_entry->addr);
 		hlist_add_head(&new->list, mcast_list);
 		ret++;
 	}
Signature · 1 line
1.7.10.4
#1 lore raw
Quoted 9 lines · On Monday 17 February 2014 23:12:35 Linus Lüssing wrote:

ether_addr_copy is supposed to be slightly more efficient for copying mac addresses, so let's use it. This makes recent versions of checkpatch happy, too.

---
 multicast.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

We need an introduced by line, so Antonio later knows what patches to squash before sending them to David.

Cheers,
Marek