diff mbox

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

Message ID 1392711245-29837-1-git-send-email-linus.luessing@web.de
State Accepted, archived
Headers show

Commit Message

Linus Lüssing Feb. 18, 2014, 8:14 a.m. UTC
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.

Introduced by e368857f66620b8483166e8e6556d9c87f9b3e71
("batman-adv: Multicast Listener Announcements via Translation Table")

Reported-by: Antonio Quartulli <antonio@meshcoding.com>
Signed-off-by: Linus Lüssing <linus.luessing@web.de>
---
 multicast.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Marek Lindner Feb. 20, 2014, 11 a.m. UTC | #1
On Tuesday 18 February 2014 09:14:05 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.
> 
> Introduced by e368857f66620b8483166e8e6556d9c87f9b3e71
> ("batman-adv: Multicast Listener Announcements via Translation Table")
> 
> Reported-by: Antonio Quartulli <antonio@meshcoding.com>
> Signed-off-by: Linus Lüssing <linus.luessing@web.de>
> ---
>  multicast.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied in revision fb4756f.

Thanks,
Marek
diff mbox

Patch

diff --git a/multicast.c b/multicast.c
index 00bb30e..e69143b 100644
--- a/multicast.c
+++ b/multicast.c
@@ -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++;
 	}