mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Denis Pithon <denis.pithon@gmail.com>
Cc: gregkh@linuxfoundation.org, vitaly.osipov@gmail.com,
	ztugcesirin@gmail.com, josh@joshtriplett.org,
	himangi774@gmail.com, superna9999@gmail.com,
	paul.gortmaker@windriver.com, devel@driverdev.osuosl.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging/wlan-ng: use ether_addr_equal_unaligned
Date: Sun, 01 Jun 2014 02:35:37 -0700	[thread overview]
Message-ID: <1401615337.15125.7.camel@joe-AO725> (raw)
In-Reply-To: <1401607325-32733-1-git-send-email-denis.pithon@gmail.com>

On Sun, 2014-06-01 at 09:22 +0200, Denis Pithon wrote:
> This patch get rid of all memcmp() on ethernet addresses in wlan-ng.
> Replaced with ether_addr_equal_unaligned().

ether_addr_equal_unaligned is only useful for
code symmetry when some uses are known to be
ether_addr_equal.

At least one of these conversions could/should be
ether_addr_equal.

Have you checked or did you just do a global
s/memcpy/ether_addr_equal_unaligned/ ?

> diff --git a/drivers/staging/wlan-ng/prism2sta.c b/drivers/staging/wlan-ng/prism2sta.c
[]
> @@ -1505,7 +1506,8 @@ static void prism2sta_inf_assocstatus(wlandevice_t *wlandev,
>  	 */
>  
>  	for (i = 0; i < hw->authlist.cnt; i++)
> -		if (memcmp(rec.sta_addr, hw->authlist.addr[i], ETH_ALEN) == 0)
> +		if (ether_addr_equal_unaligned(rec.sta_addr,
> +					       hw->authlist.addr[i]))

I looked at this one, both are __aligned(2)
I didn't look at any others.



      reply	other threads:[~2014-06-01  9:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-01  7:22 Denis Pithon
2014-06-01  9:35 ` Joe Perches [this message]

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=1401615337.15125.7.camel@joe-AO725 \
    --to=joe@perches.com \
    --cc=denis.pithon@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=himangi774@gmail.com \
    --cc=josh@joshtriplett.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paul.gortmaker@windriver.com \
    --cc=superna9999@gmail.com \
    --cc=vitaly.osipov@gmail.com \
    --cc=ztugcesirin@gmail.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®