[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <52B1611E.4090608@huawei.com>
Date: Wed, 18 Dec 2013 16:47:26 +0800
From: Ding Tianhong <dingtianhong@...wei.com>
To: Joe Perches <joe@...ches.com>, Ding Tianhong <dthxman@...il.com>
CC: "David S. Miller" <davem@...emloft.net>,
Netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next v2 0/6] slight optimization of addr compare for
some modules
On 2013/12/17 9:58, Ding Tianhong wrote:
> On 2013/12/17 1:25, Joe Perches wrote:
>> Hi again Ding.
>>
>> These should still be inspected for appropriate use of
>> ether_addr_equal or ether_addr_equal_unaligned, but a
>> better cocci input sp-file is:
>>
>> $ cat ether_addr_equal_unaligned.cocci
>> @@
>> expression e1;
>> expression e2;
>> @@
>>
>> - !memcmp(e1, e2, \(6\|ETH_ALEN\))
>> + ether_addr_equal_unaligned(e1, e2)
>>
>> @@
>> expression e1;
>> expression e2;
>> @@
>>
>> - memcmp(e1, e2, \(6\|ETH_ALEN\)) == 0
>> + ether_addr_equal_unaligned(e1, e2)
>>
>> @@
>> expression e1;
>> expression e2;
>> @@
>>
>> - memcmp(e1, e2, \(6\|ETH_ALEN\))
>> + !ether_addr_equal_unaligned(e1, e2)
>>
>> @@
>> expression e1;
>> expression e2;
>> @@
>>
>> - memcmp(e1, e2, \(6\|ETH_ALEN\)) != 0
>> + !ether_addr_equal_unaligned(e1, e2)
>>
>>
>>
>
> great, thanks, I 'll try and test.
>
> Regards
> ding
>
Hi Joe:
There are too many places need to be changed, should I make it in one patch or several pathset,
pls give me some advise. thanks
Regards
Ding
>>
>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists