From: Anil Belur Date: Mon, 19 May 2014 09:42:48 +0000 (+1000) Subject: staging: ozwpan: ozproto.c fix for "WARNING: Prefer ether_addr_copy() over memcpy... X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=ae35f26644d1af10bfc96c5dffc5103c84a9b3c4;p=deliverable%2Flinux.git staging: ozwpan: ozproto.c fix for "WARNING: Prefer ether_addr_copy() over memcpy() if the Ethernet addresses are __aligned(2)" Fixed the warning message by replacing memcpy() with ether_addr_copy() Signed-off-by: Anil Belur Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/ozwpan/ozproto.c b/drivers/staging/ozwpan/ozproto.c index 767cac493074..110205599190 100644 --- a/drivers/staging/ozwpan/ozproto.c +++ b/drivers/staging/ozwpan/ozproto.c @@ -792,7 +792,7 @@ int oz_get_pd_list(struct oz_mac_addr *addr, int max_count) if (count >= max_count) break; pd = container_of(e, struct oz_pd, link); - memcpy(&addr[count++], pd->mac_addr, ETH_ALEN); + ether_addr_copy((u8 *)&addr[count++], pd->mac_addr); } spin_unlock_bh(&g_polling_lock); return count;