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

Larry Finger
2015-09-06T19:38:26Z

> 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(-)

The same comments apply as in patch 1/3. NACK.

Larry

>
> 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);
>
>