Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755909AbaAFUAS (ORCPT ); Mon, 6 Jan 2014 15:00:18 -0500 Received: from charlotte.tuxdriver.com ([70.61.120.58]:52694 "EHLO smtp.tuxdriver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755576AbaAFUAQ (ORCPT ); Mon, 6 Jan 2014 15:00:16 -0500 Date: Mon, 6 Jan 2014 14:53:03 -0500 From: "John W. Linville" To: Sergei Shtylyov Cc: Ding Tianhong , Larry Finger , Chaoming Li , linux-wireless@vger.kernel.org, Netdev , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v3.5 18/19] rtlwifi: slight optimization of addr compare Message-ID: <20140106195302.GF10885@tuxdriver.com> References: <52BC15EA.2020603@huawei.com> <52BC2576.3090601@cogentembedded.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <52BC2576.3090601@cogentembedded.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > >Cc: Chaoming Li > >Cc: John W. Linville > >Cc: linux-wireless@vger.kernel.org > >Cc: netdev@vger.kernel.org > >Cc: linux-kernel@vger.kernel.org > >Signed-off-by: Weilong Chen > >Signed-off-by: Ding Tianhong > >--- > > 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. -- 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/