From 07335253e121a6b3c4e63c46f34fe57ddb8a521a Mon Sep 17 00:00:00 2001 From: Sergio Paracuellos Date: Tue, 24 Apr 2018 15:50:02 +0200 Subject: [PATCH] staging: ks7010: use ether_addr_copy() instead of custom copy In order to achieve ethernet address copies, ether_addr_copy() function exists. So just use it and avoid the byte by byte copy. This increase readability. Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman --- drivers/staging/ks7010/ks_wlan_net.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/staging/ks7010/ks_wlan_net.c b/drivers/staging/ks7010/ks_wlan_net.c index 81d66ac898c6..aaa57c263002 100644 --- a/drivers/staging/ks7010/ks_wlan_net.c +++ b/drivers/staging/ks7010/ks_wlan_net.c @@ -2686,14 +2686,7 @@ int ks_wlan_net_start(struct net_device *dev) /* dummy address set */ memcpy(priv->eth_addr, dummy_addr, ETH_ALEN); - dev->dev_addr[0] = priv->eth_addr[0]; - dev->dev_addr[1] = priv->eth_addr[1]; - dev->dev_addr[2] = priv->eth_addr[2]; - dev->dev_addr[3] = priv->eth_addr[3]; - dev->dev_addr[4] = priv->eth_addr[4]; - dev->dev_addr[5] = priv->eth_addr[5]; - dev->dev_addr[6] = 0x00; - dev->dev_addr[7] = 0x00; + ether_addr_copy(dev->dev_addr, priv->eth_addr); /* The ks_wlan-specific entries in the device structure. */ dev->netdev_ops = &ks_wlan_netdev_ops; -- 2.30.2