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


Groups > linux.kernel > #1219844 > unrolled thread

[PATCH 3/3] Staging: rtl8192u: r8192U_core.c: Replace memcpy with eth_addr_copy

Started byShraddha Barke <shraddha.6596@gmail.com>
First post2015-09-06 21:10 +0200
Last post2015-09-06 21:40 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 3/3] Staging: rtl8192u: r8192U_core.c: Replace memcpy with eth_addr_copy Shraddha Barke <shraddha.6596@gmail.com> - 2015-09-06 21:10 +0200
    Re: [PATCH 3/3] Staging: rtl8192u: r8192U_core.c: Replace memcpy with  eth_addr_copy Larry Finger <Larry.Finger@lwfinger.net> - 2015-09-06 21:40 +0200

#1219844 — [PATCH 3/3] Staging: rtl8192u: r8192U_core.c: Replace memcpy with eth_addr_copy

FromShraddha Barke <shraddha.6596@gmail.com>
Date2015-09-06 21:10 +0200
Subject[PATCH 3/3] Staging: rtl8192u: r8192U_core.c: Replace memcpy with eth_addr_copy
Message-ID<q5Nua-7Ec-5@gated-at.bofh.it>
This patch replaces memcpy with eth_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/rtl8192u/r8192U_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
index 6f6fe38..577d3a4 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -3430,7 +3430,7 @@ static int r8192_set_mac_adr(struct net_device *dev, void *mac)
 
 	down(&priv->wx_sem);
 
-	memcpy(dev->dev_addr, addr->sa_data, ETH_ALEN);
+	ether_addr_copy(dev->dev_addr, addr->sa_data);
 
 	schedule_work(&priv->reset_wq);
 	up(&priv->wx_sem);
-- 
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/

[toc] | [next] | [standalone]


#1219848 — Re: [PATCH 3/3] Staging: rtl8192u: r8192U_core.c: Replace memcpy with eth_addr_copy

FromLarry Finger <Larry.Finger@lwfinger.net>
Date2015-09-06 21:40 +0200
SubjectRe: [PATCH 3/3] Staging: rtl8192u: r8192U_core.c: Replace memcpy with eth_addr_copy
Message-ID<q5NXc-8bW-25@gated-at.bofh.it>
In reply to#1219844
On 09/06/2015 02:04 PM, Shraddha Barke wrote:
> This patch replaces memcpy with eth_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/rtl8192u/r8192U_core.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
> index 6f6fe38..577d3a4 100644
> --- a/drivers/staging/rtl8192u/r8192U_core.c
> +++ b/drivers/staging/rtl8192u/r8192U_core.c
> @@ -3430,7 +3430,7 @@ static int r8192_set_mac_adr(struct net_device *dev, void *mac)
>
>   	down(&priv->wx_sem);
>
> -	memcpy(dev->dev_addr, addr->sa_data, ETH_ALEN);
> +	ether_addr_copy(dev->dev_addr, addr->sa_data);
>
>   	schedule_work(&priv->reset_wq);
>   	up(&priv->wx_sem);
>

This patch has the same problems as do both patches 1 and 2.

NACK.

Larry

--
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/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web