From 8fdd01530cda849ba531e7e9d8674fbc81ab5782 Mon Sep 17 00:00:00 2001 From: Antonio Quartulli Date: Wed, 22 Jan 2014 00:42:11 +0100 Subject: batman-adv: prefer ether_addr_copy to memcpy On some architectures ether_addr_copy() is slightly faster than memcpy() therefore use the former when possible. Signed-off-by: Antonio Quartulli Signed-off-by: Marek Lindner --- net/batman-adv/gateway_client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'net/batman-adv/gateway_client.c') diff --git a/net/batman-adv/gateway_client.c b/net/batman-adv/gateway_client.c index 07c7f2177648..c835e137423b 100644 --- a/net/batman-adv/gateway_client.c +++ b/net/batman-adv/gateway_client.c @@ -763,7 +763,7 @@ batadv_gw_dhcp_recipient_get(struct sk_buff *skb, unsigned int *header_len, if (*p != ETH_ALEN) return BATADV_DHCP_NO; - memcpy(chaddr, skb->data + chaddr_offset, ETH_ALEN); + ether_addr_copy(chaddr, skb->data + chaddr_offset); } return ret; -- cgit v1.2.3