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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <52BBEA6A.40000@huawei.com>
Date:	Thu, 26 Dec 2013 16:35:54 +0800
From:	Ding Tianhong <dingtianhong@...wei.com>
To:	Sergei Shtylyov <sergei.shtylyov@...entembedded.com>,
	Rupesh Gujare <rupesh.gujare@...el.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	<devel@...verdev.osuosl.org>, Netdev <netdev@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3 08/19] ozwpan: slight optimization of addr compare

On 2013/12/25 18:54, Sergei Shtylyov wrote:
> Hello.
> 
> On 25-12-2013 7:28, Ding Tianhong wrote:
> 
>> Use possibly more efficient ether_addr_equal
>> instead of memcmp.
> 
>> Cc: Rupesh Gujare <rupesh.gujare@...el.com>
>> Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
>> Cc: devel@...verdev.osuosl.org
>> Cc: linux-kernel@...r.kernel.org
>> Signed-off-by: Tan Xiaojun <tanxiaojun@...wei.com>
>> Signed-off-by: Ding Tianhong <dingtianhong@...wei.com>
>> ---
>>   drivers/staging/ozwpan/ozcdev.c  | 2 +-
>>   drivers/staging/ozwpan/ozproto.c | 5 +++--
>>   2 files changed, 4 insertions(+), 3 deletions(-)
> 
>> diff --git a/drivers/staging/ozwpan/ozcdev.c b/drivers/staging/ozwpan/ozcdev.c
>> index 6ce0af9..c363f66 100644
>> --- a/drivers/staging/ozwpan/ozcdev.c
>> +++ b/drivers/staging/ozwpan/ozcdev.c
>> @@ -448,7 +448,7 @@ int oz_cdev_start(struct oz_pd *pd, int resume)
>>       }
>>       spin_lock(&g_cdev.lock);
>>       if ((g_cdev.active_pd == NULL) &&
>> -        (memcmp(pd->mac_addr, g_cdev.active_addr, ETH_ALEN) == 0)) {
>> +        (ether_addr_equal(pd->mac_addr, g_cdev.active_addr))) {
> 
>    There's no point in enclosing function call into parens.
> 
> WBR, Sergei
> 

ok, thanks.

Regards
Ding
> 
> 


--
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