diff options
author | Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> | 2014-10-11 02:25:34 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-10-20 10:30:15 +0800 |
commit | e1499e81497cd46f296c4680096323f0aadd2604 (patch) | |
tree | 4bddb083e0abeae0cf0ef4b58b1139c12d672f84 /drivers/staging/bcm/HandleControlPacket.c | |
parent | ab3136cc876ac5c109cfe28d05f8c1247a899d39 (diff) | |
download | linux-e1499e81497cd46f296c4680096323f0aadd2604.tar.gz linux-e1499e81497cd46f296c4680096323f0aadd2604.tar.bz2 linux-e1499e81497cd46f296c4680096323f0aadd2604.zip |
staging: vt6655: card.c: replace memcpy() by ether_addr_copy() using coccinelle
This patch focuses on fixing the following warning generated
by checkpatch.pl for the file rxtx.c :
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);
According to ether_addr_copy() description and functionality,
all Ethernet addresses should align to the u16 datatype.
Here is the output of pahole for the relevant datastructures:
struct pmkid_candidate {
NDIS_802_11_MAC_ADDRESS BSSID; /* 0 6 */
/* XXX 2 bytes hole, try to pack */
long unsigned int Flags; /* 8 4 */
/* size: 12, cachelines: 1, members: 2 */
/* sum members: 10, holes: 1, sum holes: 2 */
/* last cacheline: 12 bytes */
};
Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/bcm/HandleControlPacket.c')
0 files changed, 0 insertions, 0 deletions