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


Groups > linux.kernel > #1219845

[PATCH 1/3] Staging: rtl8712: Replace memcpy by ether_addr_copy

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

Show all headers | View raw


This patch replaces memcpy by ethr_addr_copy

The change was made using Coccinelle

@@ expression e1, e2; @@
- memcpy(e1, e2, ETH_ALEN);
+ ether_addr_copy(e1, e2);

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
---
 drivers/staging/rtl8712/rtl871x_mp_ioctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8712/rtl871x_mp_ioctl.c b/drivers/staging/rtl8712/rtl871x_mp_ioctl.c
index 77f01bf..76c1cfe 100644
--- a/drivers/staging/rtl8712/rtl871x_mp_ioctl.c
+++ b/drivers/staging/rtl8712/rtl871x_mp_ioctl.c
@@ -167,7 +167,7 @@ static int mp_start_test(struct _adapter *padapter)
 	int res = _SUCCESS;
 
 	/* 3 1. initialize a new struct wlan_bssid_ex */
-	memcpy(bssid.MacAddress, pmppriv->network_macaddr, ETH_ALEN);
+	ether_addr_copy(bssid.MacAddress, pmppriv->network_macaddr);
 	bssid.Ssid.SsidLength = 16;
 	memcpy(bssid.Ssid.Ssid, (unsigned char *)"mp_pseudo_adhoc",
 		bssid.Ssid.SsidLength);
-- 
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 — 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