diff options
author | Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> | 2015-02-27 03:06:53 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-02-26 17:14:07 -0800 |
commit | c5f9e99b6ae704dd67f6b5f9e0f6dec968baea0f (patch) | |
tree | 4b95e5d74df01daef37ede1d986aad197e2ffcf5 /drivers/staging/vt6656 | |
parent | 6518c10be952ef0afb95e5ea5d277458e273b662 (diff) | |
download | op-kernel-dev-c5f9e99b6ae704dd67f6b5f9e0f6dec968baea0f.zip op-kernel-dev-c5f9e99b6ae704dd67f6b5f9e0f6dec968baea0f.tar.gz |
staging: vt6656: replace memcpy by ether_addr_copy
This patch fixes the following checkpatch.pl warning:
Prefer ether_addr_copy() over memcpy() if the Ethernet addresses are
__aligned(2)
The changes were applied using the following coccinelle
rule:
@@ expression e1, e2; @@
- memcpy(e1, e2, ETH_ALEN);
+ ether_addr_copy(e1, e2);
All variables defined in vnt_mac_set_key start at even offsets
making the variables aligned to the u16 datatype.
Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/vt6656')
-rw-r--r-- | drivers/staging/vt6656/mac.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/staging/vt6656/mac.c b/drivers/staging/vt6656/mac.c index bb37e33..5dfac05 100644 --- a/drivers/staging/vt6656/mac.c +++ b/drivers/staging/vt6656/mac.c @@ -30,6 +30,8 @@ * Revision History: */ +#include <linux/etherdevice.h> + #include "desc.h" #include "mac.h" #include "usbpipe.h" @@ -126,7 +128,7 @@ void vnt_mac_set_keyentry(struct vnt_private *priv, u16 key_ctl, u32 entry_idx, offset += (entry_idx * MISCFIFO_KEYENTRYSIZE); set_key.u.write.key_ctl = cpu_to_le16(key_ctl); - memcpy(set_key.u.write.addr, addr, ETH_ALEN); + ether_addr_copy(set_key.u.write.addr, addr); /* swap over swap[0] and swap[1] to get correct write order */ swap(set_key.u.swap[0], set_key.u.swap[1]); |