diff options
author | Jérôme Pinot <ngc891@gmail.com> | 2014-03-14 00:44:30 +0900 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-03-17 14:47:44 -0700 |
commit | 072dc1146fb85a9c344138a9751136dff1251333 (patch) | |
tree | 04cf75b2bee6c13f2547f2f328e63390f7109d35 /drivers/staging/ozwpan/ozpd.c | |
parent | Staging: unisys: visorutil: Clean up sparse warnings in visorutil code (diff) | |
download | linux-dev-072dc1146fb85a9c344138a9751136dff1251333.tar.xz linux-dev-072dc1146fb85a9c344138a9751136dff1251333.zip |
staging/ozwpan: coding style ether_addr_copy
This fixes the following issues detected by checkpatch.pl:
WARNING: Prefer ether_addr_copy() over memcpy() if the Ethernet addresses are __aligned(2)
#220: FILE: drivers/staging/ozwpan/ozcdev.c:220:
+ memcpy(g_cdev.active_addr, addr, ETH_ALEN);
WARNING: Prefer ether_addr_copy() over memcpy() if the Ethernet addresses are __aligned(2)
#286: FILE: drivers/staging/ozwpan/ozcdev.c:286:
+ memcpy(addr, g_cdev.active_addr, ETH_ALEN);
WARNING: Prefer ether_addr_copy() over memcpy() if the Ethernet addresses are __aligned(2)
#176: FILE: drivers/staging/ozwpan/ozpd.c:176:
+ memcpy(pd->mac_addr, mac_addr, ETH_ALEN);
Signed-off-by: Jerome Pinot <ngc891@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/ozwpan/ozpd.c')
-rw-r--r-- | drivers/staging/ozwpan/ozpd.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/staging/ozwpan/ozpd.c b/drivers/staging/ozwpan/ozpd.c index 29a23a325d71..10f1b3ac8832 100644 --- a/drivers/staging/ozwpan/ozpd.c +++ b/drivers/staging/ozwpan/ozpd.c @@ -8,6 +8,7 @@ #include <linux/timer.h> #include <linux/sched.h> #include <linux/netdevice.h> +#include <linux/etherdevice.h> #include <linux/errno.h> #include "ozdbg.h" #include "ozprotocol.h" @@ -173,7 +174,7 @@ struct oz_pd *oz_pd_alloc(const u8 *mac_addr) pd->last_rx_pkt_num = 0xffffffff; oz_pd_set_state(pd, OZ_PD_S_IDLE); pd->max_tx_size = OZ_MAX_TX_SIZE; - memcpy(pd->mac_addr, mac_addr, ETH_ALEN); + ether_addr_copy(pd->mac_addr, mac_addr); if (0 != oz_elt_buf_init(&pd->elt_buff)) { kfree(pd); pd = NULL; |