lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <52BC2576.3090601@cogentembedded.com>
Date:	Thu, 26 Dec 2013 16:47:50 +0400
From:	Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To:	Ding Tianhong <dingtianhong@...wei.com>,
	Larry Finger <Larry.Finger@...inger.net>,
	Chaoming Li <chaoming_li@...lsil.com.cn>,
	"John W. Linville" <linville@...driver.com>,
	linux-wireless@...r.kernel.org, Netdev <netdev@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3.5 18/19] rtlwifi: slight optimization of addr compare

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@...inger.net>
> Cc: Chaoming Li <chaoming_li@...lsil.com.cn>
> Cc: John W. Linville <linville@...driver.com>
> Cc: linux-wireless@...r.kernel.org
> Cc: netdev@...r.kernel.org
> Cc: linux-kernel@...r.kernel.org
> Signed-off-by: Weilong Chen <chenweilong@...wei.com>
> Signed-off-by: Ding Tianhong <dingtianhong@...wei.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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ