[OPW,kernel] staging: rtl8188eu: Use ether_addr_copy function
diff mbox

Message ID 1414703157-21615-1-git-send-email-dilekuzulmez@gmail.com
State New, archived
Headers show

Commit Message

Dilek Uzulmez Oct. 30, 2014, 9:05 p.m. UTC
This patch fixes the following checkpatch.pl warnings:
WARNING: "Prefer ether_addr_copy() over memcpy() if the Ethernet
addresses are __aligned(2)" in file rtw_cmd.c
Pahole shows that the addresses are aligned

Signed-off-by: Dilek Uzulmez <dilekuzulmez@gmail.com>
---
 drivers/staging/rtl8188eu/core/rtw_cmd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Greg KH Oct. 30, 2014, 9:28 p.m. UTC | #1
On Thu, Oct 30, 2014 at 11:05:57PM +0200, Dilek Uzulmez wrote:
> This patch fixes the following checkpatch.pl warnings:
> WARNING: "Prefer ether_addr_copy() over memcpy() if the Ethernet
> addresses are __aligned(2)" in file rtw_cmd.c
> Pahole shows that the addresses are aligned

Really?  Can you "prove" it?

Hint, look in the archives for how to prove this properly, others have
done so...

thanks,

greg k-h

Patch
diff mbox

diff --git a/drivers/staging/rtl8188eu/core/rtw_cmd.c b/drivers/staging/rtl8188eu/core/rtw_cmd.c
index aa1d646..7219477 100644
--- a/drivers/staging/rtl8188eu/core/rtw_cmd.c
+++ b/drivers/staging/rtl8188eu/core/rtw_cmd.c
@@ -461,7 +461,7 @@  u8 rtw_joinbss_cmd(struct adapter  *padapter, struct wlan_network *pnetwork)
 	/*  the driver just has the bssid information for PMKIDList searching. */
 
 	if (!pmlmepriv->assoc_by_bssid)
-		memcpy(&pmlmepriv->assoc_bssid[0], &pnetwork->network.MacAddress[0], ETH_ALEN);
+		ether_addr_copy(&pmlmepriv->assoc_bssid[0], &pnetwork->network.MacAddress[0], ETH_ALEN);
 
 	psecnetwork->IELength = rtw_restruct_sec_ie(padapter, &pnetwork->network.IEs[0], &psecnetwork->IEs[0], pnetwork->network.IELength);