From: "Linus Lüssing" <linus.luessing@web.de>
To: b.a.t.m.a.n@lists.open-mesh.org
Subject: [B.A.T.M.A.N.] [PATCHv2] batman-adv: use ether_addr_copy instead of memcpy in multicast code
Date: Tue, 18 Feb 2014 09:14:05 +0100 [thread overview]
Message-ID: <1392711245-29837-1-git-send-email-linus.luessing@web.de> (raw)
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(-)
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++;
}
--
1.7.10.4
next reply other threads:[~2014-02-18 8:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-18 8:14 Linus Lüssing [this message]
2014-02-20 11:00 ` [B.A.T.M.A.N.] [PATCHv2] batman-adv: use ether_addr_copy instead of memcpy in multicast code Marek Lindner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1392711245-29837-1-git-send-email-linus.luessing@web.de \
--to=linus.luessing@web.de \
--cc=b.a.t.m.a.n@lists.open-mesh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox