staging: prism2sta: Replace memcpy with ether_add_copy
PATCH 1/1 staging: prism2sta: Replace memcpy with ether_add_copy
Replace memcpy() with ether_addr_copy() when using __aligned(2) Ethernet addresses.
Changes done using the following coccinelle script:
@@
expression e1, e2;
@@
- memcpy(e1, e2, ETH_ALEN);
+ ether_addr_copy(e1, e2);
--- drivers/staging/wlan-ng/prism2sta.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/wlan-ng/prism2sta.c +3 -3
@@ -1544,7 +1544,7 @@ static void prism2sta_inf_authreq_defer(wlandevice_t *wlandev,** authentication. */ -memcpy (rec.address, inf->info.authreq.sta_addr,ETH_ALEN ); +ether_addr_copy (rec.address, inf->info.authreq.sta_addr); rec.status = P80211ENUM_status_unspec_failure;/*
@@ -1657,8 +1657,8 @@ static void prism2sta_inf_authreq_defer(wlandevice_t *wlandev,if (hw->authlist.cnt >=WLAN_AUTH_MAX ) { rec.status = P80211ENUM_status_ap_full; }else { -memcpy (hw->authlist.addr[hw->authlist.cnt], - rec.address,ETH_ALEN ); +ether_addr_copy (hw->authlist.addr[hw->authlist.cnt], + rec.address); hw->authlist.cnt++; added =1 ; }
Signature · 1 line
1.9.1
Quoted 8 lines · Ioana Ciornei
Replace
memcpy()withether_addr_copy()when using__aligned(2)Ethernet addresses.
Changes done using the following coccinelle script:@@
expression e1, e2;
@@
Quoted 7 lines
-
memcpy(e1, e2, ETH_ALEN);
+ether_addr_copy(e1, e2);Signed-off-by Ioana Ciornei <[email protected]>--- drivers/staging/wlan-ng/prism2sta.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
This looks good to me!
Jes
Quoted 25 lines
drivers/staging/wlan-ng/prism2sta.c +3
-3@@ -1544,7 +1544,7 @@ static void prism2sta_inf_authreq_defer(wlandevice_t *wlandev,** authentication. */ -memcpy (rec.address, inf->info.authreq.sta_addr,ETH_ALEN ); +ether_addr_copy (rec.address, inf->info.authreq.sta_addr); rec.status = P80211ENUM_status_unspec_failure;/* @@ -1657,8 +1657,8 @@ static void prism2sta_inf_authreq_defer(wlandevice_t *wlandev,if (hw->authlist.cnt >=WLAN_AUTH_MAX ) { rec.status = P80211ENUM_status_ap_full; }else { -memcpy (hw->authlist.addr[hw->authlist.cnt], - rec.address,ETH_ALEN ); +ether_addr_copy (hw->authlist.addr[hw->authlist.cnt], + rec.address); hw->authlist.cnt++; added =1 ; }
Greg KH
maintainerQuoted 8 lines · Ioana Ciornei
Replace
memcpy()withether_addr_copy()when using__aligned(2)Ethernet addresses.
Changes done using the following coccinelle script:@@
expression e1, e2;
@@
Quoted 7 lines
-
memcpy(e1, e2, ETH_ALEN);
+ether_addr_copy(e1, e2);Signed-off-by Ioana Ciornei <[email protected]>--- drivers/staging/wlan-ng/prism2sta.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
You need to "prove" that this type of change is acceptable before I can take it, sorry.
thanks,
greg k-h