From 1409a93274bb1b17f0b7a0b255a75e80899eec11 Mon Sep 17 00:00:00 2001 From: Joe Perches Date: Thu, 1 Aug 2013 16:17:49 -0700 Subject: ethernet: Convert mac address uses of 6 to ETH_ALEN Use the normal #define to help grep find mac addresses and ensure that addresses are aligned. pasemi.h has an unaligned access to mac_addr, unchanged for now. Signed-off-by: Joe Perches Acked-by: Olof Johansson # pasemi_mac pieces Signed-off-by: David S. Miller --- drivers/net/ethernet/nuvoton/w90p910_ether.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/net/ethernet/nuvoton') diff --git a/drivers/net/ethernet/nuvoton/w90p910_ether.c b/drivers/net/ethernet/nuvoton/w90p910_ether.c index e88bdb1aa669..dcfe58fa3b8a 100644 --- a/drivers/net/ethernet/nuvoton/w90p910_ether.c +++ b/drivers/net/ethernet/nuvoton/w90p910_ether.c @@ -922,7 +922,7 @@ static void __init get_mac_address(struct net_device *dev) { struct w90p910_ether *ether = netdev_priv(dev); struct platform_device *pdev; - char addr[6]; + char addr[ETH_ALEN]; pdev = ether->pdev; @@ -934,7 +934,7 @@ static void __init get_mac_address(struct net_device *dev) addr[5] = 0xa8; if (is_valid_ether_addr(addr)) - memcpy(dev->dev_addr, &addr, 0x06); + memcpy(dev->dev_addr, &addr, ETH_ALEN); else dev_err(&pdev->dev, "invalid mac address\n"); } -- cgit v1.2.3