[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <5327D3C6.70400@gmail.com>
Date: Mon, 17 Mar 2014 23:04:06 -0600
From: Joel Pelaez Jorge <joelpelaez@...il.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Joe Perches <joe@...ches.com>,
Rashika Kheria <rashika.kheria@...il.com>,
Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@...el.com>
CC: linux-kernel@...r.kernel.org, devel@...verdev.osuosl.org,
Jingoo Han <jg1.han@...sung.com>,
Wei Yongjun <yongjun_wei@...ndmicro.com.cn>,
Dan Carpenter <dan.carpenter@...cle.com>
Subject: [PATCH] staging: slicoss: Fix prefer ether_addr_copy over memcpy
This patch fixes the following checkpatch.pl issues caused by the new
function: ether_addr_copy
Signed-off-by: Joel Pelaez Jorge <joelpelaez@...il.com>
---
drivers/staging/slicoss/slicoss.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers/staging/slicoss/slicoss.c
b/drivers/staging/slicoss/slicoss.c
index 12aafe3..0e0e374 100644
--- a/drivers/staging/slicoss/slicoss.c
+++ b/drivers/staging/slicoss/slicoss.c
@@ -581,15 +581,15 @@ static void slic_adapter_set_hwaddr(struct adapter
*adapter)
struct sliccard *card = adapter->card;
if ((adapter->card) && (card->config_set)) {
- memcpy(adapter->macaddr,
- card->config.MacInfo[adapter->functionnumber].macaddrA,
- sizeof(struct slic_config_mac));
+ ether_addr_copy(adapter->macaddr,
+ card->config.MacInfo[adapter->functionnumber]
+ .macaddrA);
if (is_zero_ether_addr(adapter->currmacaddr))
- memcpy(adapter->currmacaddr, adapter->macaddr,
- ETH_ALEN);
+ ether_addr_copy(adapter->currmacaddr,
+ adapter->macaddr);
if (adapter->netdev)
- memcpy(adapter->netdev->dev_addr, adapter->currmacaddr,
- ETH_ALEN);
+ ether_addr_copy(adapter->netdev->dev_addr,
+ adapter->currmacaddr);
}
}
@@ -810,8 +810,8 @@ static int slic_mac_set_address(struct net_device
*dev, void *ptr)
if (!is_valid_ether_addr(addr->sa_data))
return -EINVAL;
- memcpy(dev->dev_addr, addr->sa_data, dev->addr_len);
- memcpy(adapter->currmacaddr, addr->sa_data, dev->addr_len);
+ ether_addr_copy(dev->dev_addr, addr->sa_data);
+ ether_addr_copy(adapter->currmacaddr, addr->sa_data);
slic_config_set(adapter, true);
return 0;
@@ -2313,7 +2313,7 @@ static int slic_mcast_add_list(struct adapter
*adapter, char *address)
if (mcaddr == NULL)
return 1;
- memcpy(mcaddr->address, address, ETH_ALEN);
+ ether_addr_copy(mcaddr->address, address);
mcaddr->next = adapter->mcastaddrs;
adapter->mcastaddrs = mcaddr;
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists