diff options
author | Elena Oat <oat.elena@gmail.com> | 2014-03-06 22:10:34 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-03-07 22:44:04 (GMT) |
commit | 48e7124179192a404121922d2c2f2f355b56ec0e (patch) | |
tree | 326d671381bdc0505dee508cfe55f1f9b871ccec | |
parent | 2c05f00f88dbf78d4b2d0e6f8d5b6c7332b0e113 (diff) | |
download | linux-48e7124179192a404121922d2c2f2f355b56ec0e.tar.xz |
Staging: rtl8188eu: Fix warning of prefer ether_addr_copy().
This patch fixes the warning produced by checkpatch "Prefer
ether_addr_copy() over memcpy() if the Ethernet addresses are
__aligned(2)". The address that is copied is a field of
nat25_network_db_entry structure. Definition for this struct is found in
rtw_br_ext.h file. Pahole shows that the addresses are 2-byte aligned.
Signed-off-by: Elena Oat <oat.elena@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/rtl8188eu/core/rtw_br_ext.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/rtl8188eu/core/rtw_br_ext.c b/drivers/staging/rtl8188eu/core/rtw_br_ext.c index 96c8a93..c5a703a 100644 --- a/drivers/staging/rtl8188eu/core/rtw_br_ext.c +++ b/drivers/staging/rtl8188eu/core/rtw_br_ext.c @@ -409,7 +409,7 @@ static void __nat25_db_network_insert(struct adapter *priv, db = priv->nethash[hash]; while (db != NULL) { if (!memcmp(db->networkAddr, networkAddr, MAX_NETWORK_ADDR_LEN)) { - memcpy(db->macAddr, macAddr, ETH_ALEN); + ether_addr_copy(db->macAddr, macAddr); db->ageing_timer = jiffies; spin_unlock_bh(&priv->br_ext_lock); return; @@ -422,7 +422,7 @@ static void __nat25_db_network_insert(struct adapter *priv, return; } memcpy(db->networkAddr, networkAddr, MAX_NETWORK_ADDR_LEN); - memcpy(db->macAddr, macAddr, ETH_ALEN); + ether_addr_copy(db->macAddr, macAddr); atomic_set(&db->use_count, 1); db->ageing_timer = jiffies; |