Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1219846

[PATCH 2/3] Staging: rtl8192e: Replace memcpy by ethr_addr_copy

From Shraddha Barke <shraddha.6596@gmail.com>
Newsgroups linux.kernel
Subject [PATCH 2/3] Staging: rtl8192e: Replace memcpy by ethr_addr_copy
Date 2015-09-06 21:10 +0200
Message-ID <q5Nub-7Ec-25@gated-at.bofh.it> (permalink)
References <q5Nua-7Ec-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


The patch replaces memcpy with ethr_addr_copy

The changes were applied using the following coccinelle
rule:
@@ expression e1, e2; @@
- memcpy(e1, e2, ETH_ALEN);
+ ether_addr_copy(e1, e2);

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
---
 drivers/staging/rtl8192e/rtllib_softmac_wx.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtllib_softmac_wx.c b/drivers/staging/rtl8192e/rtllib_softmac_wx.c
index 86f52ac..cf243fe 100644
--- a/drivers/staging/rtl8192e/rtllib_softmac_wx.c
+++ b/drivers/staging/rtl8192e/rtllib_softmac_wx.c
@@ -122,8 +122,8 @@ int rtllib_wx_get_wap(struct rtllib_device *ieee,
 
 		eth_zero_addr(wrqu->ap_addr.sa_data);
 	else
-		memcpy(wrqu->ap_addr.sa_data,
-		       ieee->current_network.bssid, ETH_ALEN);
+		ether_addr_copy(wrqu->ap_addr.sa_data,
+				ieee->current_network.bssid);
 
 	spin_unlock_irqrestore(&ieee->lock, flags);
 
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 1/3] Staging: rtl8712: Replace memcpy by ether_addr_copy Shraddha Barke <shraddha.6596@gmail.com> - 2015-09-06 21:10 +0200
  [PATCH 2/3] Staging: rtl8192e: Replace memcpy by ethr_addr_copy Shraddha Barke <shraddha.6596@gmail.com> - 2015-09-06 21:10 +0200
    Re: [PATCH 2/3] Staging: rtl8192e: Replace memcpy by ethr_addr_copy Larry Finger <Larry.Finger@lwfinger.net> - 2015-09-06 21:40 +0200
  Re: [PATCH 1/3] Staging: rtl8712: Replace memcpy by ether_addr_copy Larry Finger <Larry.Finger@lwfinger.net> - 2015-09-06 21:40 +0200

csiph-web