From: "John W. Linville" <linville@tuxdriver.com>
To: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Cc: Ding Tianhong <dingtianhong@huawei.com>,
Larry Finger <Larry.Finger@lwfinger.net>,
Chaoming Li <chaoming_li@realsil.com.cn>,
linux-wireless@vger.kernel.org, Netdev <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3.5 18/19] rtlwifi: slight optimization of addr compare
Date: Mon, 6 Jan 2014 14:53:03 -0500 [thread overview]
Message-ID: <20140106195302.GF10885@tuxdriver.com> (raw)
In-Reply-To: <52BC2576.3090601@cogentembedded.com>
On Thu, Dec 26, 2013 at 04:47:50PM +0400, Sergei Shtylyov wrote:
> Hello.
>
> On 26-12-2013 15:41, Ding Tianhong wrote:
>
> >Use possibly more efficient ether_addr_equal_unaligned
> >instead of memcmp.
>
> >Cc: Larry Finger <Larry.Finger@lwfinger.net>
> >Cc: Chaoming Li <chaoming_li@realsil.com.cn>
> >Cc: John W. Linville <linville@tuxdriver.com>
> >Cc: linux-wireless@vger.kernel.org
> >Cc: netdev@vger.kernel.org
> >Cc: linux-kernel@vger.kernel.org
> >Signed-off-by: Weilong Chen <chenweilong@huawei.com>
> >Signed-off-by: Ding Tianhong <dingtianhong@huawei.com>
> >---
> > drivers/net/wireless/rtlwifi/cam.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
>
> >diff --git a/drivers/net/wireless/rtlwifi/cam.c b/drivers/net/wireless/rtlwifi/cam.c
> >index 0e510f7..0276153 100644
> >--- a/drivers/net/wireless/rtlwifi/cam.c
> >+++ b/drivers/net/wireless/rtlwifi/cam.c
> [...]
> >@@ -335,7 +335,7 @@ void rtl_cam_del_entry(struct ieee80211_hw *hw, u8 *sta_addr)
> > addr = rtlpriv->sec.hwsec_cam_sta_addr[i];
> > bitmap = (rtlpriv->sec.hwsec_cam_bitmap) >> i;
> > if (((bitmap & BIT(0)) == BIT(0)) &&
> >- (memcmp(addr, sta_addr, ETH_ALEN) == 0)) {
> >+ (ether_addr_equal_unaligned(addr, sta_addr))) {
>
> It's pointless to enclose function call in parens, again.
I'll correct that issue when merging the patch.
--
John W. Linville Someday the world will need a hero, and you
linville@tuxdriver.com might be all we have. Be ready.
next prev parent reply other threads:[~2014-01-06 19:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-26 11:41 [PATCH v3.5 18/19] rtlwifi: slight optimization of addr compare Ding Tianhong
2013-12-26 12:47 ` Sergei Shtylyov
2014-01-06 19:53 ` John W. Linville [this message]
2014-01-06 20:51 ` John W. Linville
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=20140106195302.GF10885@tuxdriver.com \
--to=linville@tuxdriver.com \
--cc=Larry.Finger@lwfinger.net \
--cc=chaoming_li@realsil.com.cn \
--cc=dingtianhong@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=sergei.shtylyov@cogentembedded.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;
as well as URLs for NNTP newsgroup(s).