From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Ding Tianhong <dingtianhong@huawei.com>,
Larry Finger <Larry.Finger@lwfinger.net>,
Chaoming Li <chaoming_li@realsil.com.cn>,
"John W. Linville" <linville@tuxdriver.com>,
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: Thu, 26 Dec 2013 16:47:50 +0400 [thread overview]
Message-ID: <52BC2576.3090601@cogentembedded.com> (raw)
In-Reply-To: <52BC15EA.2020603@huawei.com>
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.
WBR, Sergei
next prev parent reply other threads:[~2013-12-26 12:47 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 [this message]
2014-01-06 19:53 ` John W. Linville
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=52BC2576.3090601@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.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=linville@tuxdriver.com \
--cc=netdev@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.