mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/1] staging: ozwpan: ozproto.c fix for "WARNING: Prefer ether_addr_copy() over memcpy() if the Ethernet addresses are __aligned(2)"
@ 2014-05-19  9:42 Anil Belur
  0 siblings, 0 replies; only message in thread
From: Anil Belur @ 2014-05-19  9:42 UTC (permalink / raw)
  To: rupesh.gujare; +Cc: gregkh, linux-kernel, devel, Anil Belur

From: Anil Belur <askb23@gmail.com>

Fixed the warning message by replacing memcpy() with ether_addr_copy()

Signed-off-by: Anil Belur <askb23@gmail.com>
---
 drivers/staging/ozwpan/ozproto.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/ozwpan/ozproto.c b/drivers/staging/ozwpan/ozproto.c
index f09acd0..1c80132 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;
-- 
1.9.0


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-05-19  9:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-19  9:42 [PATCH 1/1] staging: ozwpan: ozproto.c fix for "WARNING: Prefer ether_addr_copy() over memcpy() if the Ethernet addresses are __aligned(2)" Anil Belur

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome