mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Fabian Frederick <fabf@skynet.be>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
	"John W. Linville" <linville@tuxdriver.com>,
	akpm <akpm@linux-foundation.org>
Subject: Re: [PATCH 1/1] net/wireless/util.c: replace memcpy by ether_addr_copy
Date: Tue, 13 May 2014 15:05:40 +0200	[thread overview]
Message-ID: <1399986340.4137.14.camel@jlt4.sipsolutions.net> (raw)
In-Reply-To: <20140512195114.5fca94e46368be5daaa9e56b@skynet.be>

On Mon, 2014-05-12 at 19:51 +0200, Fabian Frederick wrote:
> Cc: Johannes Berg <johannes@sipsolutions.net>
> Cc: "John W. Linville" <linville@tuxdriver.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Signed-off-by: Fabian Frederick <fabf@skynet.be>
> ---
>  net/wireless/util.c | 42 +++++++++++++++++++++---------------------
>  1 file changed, 21 insertions(+), 21 deletions(-)
> 
> diff --git a/net/wireless/util.c b/net/wireless/util.c
> index e5872ff..ab23b95 100644
> --- a/net/wireless/util.c
> +++ b/net/wireless/util.c
> @@ -381,8 +381,8 @@ int ieee80211_data_to_8023(struct sk_buff *skb, const u8 *addr,
>  	 *   1     0   BSSID SA    DA    n/a
>  	 *   1     1   RA    TA    DA    SA
>  	 */
> -	memcpy(dst, ieee80211_get_DA(hdr), ETH_ALEN);
> -	memcpy(src, ieee80211_get_SA(hdr), ETH_ALEN);
> +	ether_addr_copy(dst, ieee80211_get_DA(hdr));
> +	ether_addr_copy(src, ieee80211_get_SA(hdr));

I think this patch is mostly fine, but I'd like you to understand and
document (in the commit log) why it is, and fix the (potential future)
issue with "dst" as discussed in the other thread.

johannes


  reply	other threads:[~2014-05-13 13:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-12 17:51 Fabian Frederick
2014-05-13 13:05 ` Johannes Berg [this message]
2014-05-13 14:42   ` Fabian Frederick

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1399986340.4137.14.camel@jlt4.sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=akpm@linux-foundation.org \
    --cc=fabf@skynet.be \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®