All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 03/20] net: pcnet: slight optimization of addr compare
@ 2013-12-24 11:27 Ding Tianhong
  2013-12-24 12:38 ` Joe Perches
  0 siblings, 1 reply; 5+ messages in thread
From: Ding Tianhong @ 2013-12-24 11:27 UTC (permalink / raw)
  To: Don Fry, Netdev, linux-kernel

Use possibly more efficient ether_addr_equal_unaligned
to instead of memcmp.

Cc: Don Fry <pcnet32@frontier.com>
Cc: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ding Tianhong <dingtianhong@huawei.com>
---
 drivers/net/ethernet/amd/pcnet32.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/amd/pcnet32.c b/drivers/net/ethernet/amd/pcnet32.c
index 38492e0..9339ccc 100644
--- a/drivers/net/ethernet/amd/pcnet32.c
+++ b/drivers/net/ethernet/amd/pcnet32.c
@@ -1668,7 +1668,7 @@ pcnet32_probe1(unsigned long ioaddr, int shared, struct pci_dev *pdev)
 	for (i = 0; i < ETH_ALEN; i++)
 		promaddr[i] = inb(ioaddr + i);
 
-	if (memcmp(promaddr, dev->dev_addr, ETH_ALEN) ||
+	if (!ether_addr_equal(promaddr, dev->dev_addr) ||
 	    !is_valid_ether_addr(dev->dev_addr)) {
 		if (is_valid_ether_addr(promaddr)) {
 			if (pcnet32_debug & NETIF_MSG_PROBE) {
-- 
1.8.0




^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v2 03/20] net: pcnet: slight optimization of addr compare
  2013-12-24 11:27 [PATCH v2 03/20] net: pcnet: slight optimization of addr compare Ding Tianhong
@ 2013-12-24 12:38 ` Joe Perches
  2013-12-24 13:47   ` Ding Tianhong
  0 siblings, 1 reply; 5+ messages in thread
From: Joe Perches @ 2013-12-24 12:38 UTC (permalink / raw)
  To: Ding Tianhong; +Cc: Don Fry, Netdev, linux-kernel

On Tue, 2013-12-24 at 19:27 +0800, Ding Tianhong wrote:
> Use possibly more efficient ether_addr_equal_unaligned
> to instead of memcmp.

Hi again Ding.

> diff --git a/drivers/net/ethernet/amd/pcnet32.c b/drivers/net/ethernet/amd/pcnet32.c
[]
> @@ -1668,7 +1668,7 @@ pcnet32_probe1(unsigned long ioaddr, int shared, struct pci_dev *pdev)
[]
> -	if (memcmp(promaddr, dev->dev_addr, ETH_ALEN) ||
> +	if (!ether_addr_equal(promaddr, dev->dev_addr) ||

Can you please make sure the commit message matches the
code changes?

This uses ether_addr_equal not ether_addr_equal_unaligned.

Thanks for the work.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2 03/20] net: pcnet: slight optimization of addr compare
  2013-12-24 12:38 ` Joe Perches
@ 2013-12-24 13:47   ` Ding Tianhong
  2013-12-24 17:59     ` David Miller
  0 siblings, 1 reply; 5+ messages in thread
From: Ding Tianhong @ 2013-12-24 13:47 UTC (permalink / raw)
  To: Joe Perches, Ding Tianhong; +Cc: Don Fry, Netdev, linux-kernel

于 2013/12/24 20:38, Joe Perches 写道:
> On Tue, 2013-12-24 at 19:27 +0800, Ding Tianhong wrote:
>> Use possibly more efficient ether_addr_equal_unaligned
>> to instead of memcmp.
> 
> Hi again Ding.
> 
>> diff --git a/drivers/net/ethernet/amd/pcnet32.c b/drivers/net/ethernet/amd/pcnet32.c
> []
>> @@ -1668,7 +1668,7 @@ pcnet32_probe1(unsigned long ioaddr, int shared, struct pci_dev *pdev)
> []
>> -	if (memcmp(promaddr, dev->dev_addr, ETH_ALEN) ||
>> +	if (!ether_addr_equal(promaddr, dev->dev_addr) ||
> 
> Can you please make sure the commit message matches the
> code changes?
> 
> This uses ether_addr_equal not ether_addr_equal_unaligned.
> 
> Thanks for the work.
> 

Oh, no,  maybe I was dizzy by these patches,  I should be more careful,
sorry about that, I will resend this one.

Regards
Ding

> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2 03/20] net: pcnet: slight optimization of addr compare
  2013-12-24 13:47   ` Ding Tianhong
@ 2013-12-24 17:59     ` David Miller
  2013-12-25  1:40       ` Ding Tianhong
  0 siblings, 1 reply; 5+ messages in thread
From: David Miller @ 2013-12-24 17:59 UTC (permalink / raw)
  To: dthxman; +Cc: joe, dingtianhong, pcnet32, netdev, linux-kernel

From: Ding Tianhong <dthxman@gmail.com>
Date: Tue, 24 Dec 2013 21:47:30 +0800

> Oh, no,  maybe I was dizzy by these patches,  I should be more careful,
> sorry about that, I will resend this one.

You must resend the entire patch series when you make any changes.

Thank you.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2 03/20] net: pcnet: slight optimization of addr compare
  2013-12-24 17:59     ` David Miller
@ 2013-12-25  1:40       ` Ding Tianhong
  0 siblings, 0 replies; 5+ messages in thread
From: Ding Tianhong @ 2013-12-25  1:40 UTC (permalink / raw)
  To: David Miller, dthxman; +Cc: joe, pcnet32, netdev, linux-kernel

On 2013/12/25 1:59, David Miller wrote:
> From: Ding Tianhong <dthxman@gmail.com>
> Date: Tue, 24 Dec 2013 21:47:30 +0800
> 
>> Oh, no,  maybe I was dizzy by these patches,  I should be more careful,
>> sorry about that, I will resend this one.
> 
> You must resend the entire patch series when you make any changes.
> 
> Thank you.
> 
> 

ok



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-12-25  1:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-24 11:27 [PATCH v2 03/20] net: pcnet: slight optimization of addr compare Ding Tianhong
2013-12-24 12:38 ` Joe Perches
2013-12-24 13:47   ` Ding Tianhong
2013-12-24 17:59     ` David Miller
2013-12-25  1:40       ` Ding Tianhong

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.