OSDN Git Service

Staging: wilc1000: Replace memcpy by ether_addr_copy
authorMihaela Muraru <mihaela.muraru21@gmail.com>
Tue, 11 Oct 2016 16:54:42 +0000 (19:54 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 16 Oct 2016 08:26:30 +0000 (10:26 +0200)
commit32623b0d28e53f926d962c863ce9a62ddc70f376
tree6a0eac4014f37b4b295980725ba612673e02130d
parentf9d033c8ecef66365d78db31c18eda1be86136bc
Staging: wilc1000: 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)

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 del_sta {
u8                         mac_addr[6];          /*     0     6 */

/* size: 6, cachelines: 1, members: 1 */
/* last cacheline: 6 bytes */
};

struct sta_inactive_t {
u8                         mac[6];               /*     0     6 */

/* size: 6, cachelines: 1, members: 1 */
/* last cacheline: 6 bytes */
};

Signed-off-by: Mihaela Muraru <mihaela.muraru21@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wilc1000/host_interface.c