Re: [PATCH v3 08/19] ozwpan: slight optimization of addr compare

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
>> Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
>> Cc: devel@xxxxxxxxxxxxxxxxxxxx
>> Cc: linux-kernel@xxxxxxxxxxxxxxx
>> Signed-off-by: Tan Xiaojun <tanxiaojun@xxxxxxxxxx>
>> Signed-off-by: Ding Tianhong <dingtianhong@xxxxxxxxxx>
>> ---
>>   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
> 
> 


_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux