Skip to contentSkip to conversation

staging: ozwpan: ozproto.c fix for "WARNING: Prefer ether_addr_copy() over memcpy() if the Ethernet addresses are __aligned(2)"

PATCH New Anil Belur 1 participant 1 message May 19, 2014 Staging

lore
Share & tools
lore

Anil Belur

author
#0 lore raw

PATCH 1/1 staging: ozwpan: ozproto.c fix for "WARNING: Prefer ether_addr_copy() over memcpy() if the Ethernet addresses are __aligned(2)"

From: Anil Belur <[email protected]>

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

---
 drivers/staging/ozwpan/ozproto.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/ozwpan/ozproto.c +1 -1
index f09acd0..1c80132 100644
@@ -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;
Signature · 1 line
1.9.0