Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Staging: et131x: Fix warning of prefer ether_addr_copy() in et131x.c

This patch fixes the following checkpatch.pl warnings:
WARNING: "Prefer ether_addr_copy() over memcpy() if the Ethernet addresses are __aligned(2)".
I used pahole to see whether addresses are aligned.

Signed-off-by: Monam Agarwal <monamagarwal123@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Monam Agarwal and committed by
Greg Kroah-Hartman
015851c3 3eed3d36

+2 -2
+2 -2
drivers/staging/et131x/et131x.c
··· 3527 3527 goto err_out; 3528 3528 } 3529 3529 } 3530 - memcpy(adapter->addr, adapter->rom_addr, ETH_ALEN); 3530 + ether_addr_copy(adapter->addr, adapter->rom_addr); 3531 3531 out: 3532 3532 return rc; 3533 3533 err_out: ··· 3774 3774 adapter->registry_jumbo_packet = 1514; /* 1514-9216 */ 3775 3775 3776 3776 /* Set the MAC address to a default */ 3777 - memcpy(adapter->addr, default_mac, ETH_ALEN); 3777 + ether_addr_copy(adapter->addr, default_mac); 3778 3778 3779 3779 return adapter; 3780 3780 }